[ANN] RubyInline 3.6.3 Released

R

Ryan Davis

RubyInline version 3.6.3 has been released!

http://rubyforge.org/projects/rubyinline/
http://www.zenspider.com/ZSS/Products/RubyInline/

Ruby Inline is an analog to Perl's Inline::C. Out of the box, it
allows you to embed C/++ external module code in your ruby script
directly. By writing simple builder classes, you can teach how to cope
with new languages (fortran, perl, whatever). The code is compiled and
run on the fly when needed.

Changes:

*** 3.6.3 / 2007-04-27

+ 7 minor enhancements:
Added map_ruby_const and map_c_const to C builder.
Converted example.rb to a real benchmark setup.
Improved error messages.
Added options hash for all C builder methods.
Options hash can take optional :method_name param to have ruby name
diff from c.
Converted to a more traditional setup. Now I can heckle!
Cleaned up ruby.h search.
+ 2 bug fixes:
Added CCDLFLAGS. _Should_ pick up -fPIC on misconfigured 64 bit
machines.
Broke up all warnings so progress report was cleaner.

http://rubyforge.org/projects/rubyinline/
http://www.zenspider.com/ZSS/Products/RubyInline/
 
H

Haoqi Haoqi

I get "Define INLINEDIR or HOME in your environment and try again"
error.how do it?

require "inline"

class MyTest
inline do |builder|
builder.c "
long factorial(int max) {
int i=max, result=1;
while (i >= 2) { result *= i--; }
return result;
}"
end
end
t = MyTest.new()
factorial_5 = t.factorial(5)
 
H

Haoqi Haoqi

hello,I added "ENV['HOME']='./'",then get errors:

cl : Command line warning D9035 : option 'Og-' has been deprecated and
will be removed in a future release
cl : Command line warning D9035 : option 'o' has been deprecated and
will be removed in a future release
cl : Command line warning D9002 : ignoring unknown option '-G6'
c:/ruby/lib/ruby/gems/1.8/gems/RubyInline-3.6.3/lib/inline.rb:391:in
`build': error executing cl -nologo -LD -MD -Zi -O2b2xg- -G6 -I
c:/ruby/lib/ruby/1.8/i386-mswin32 -I c:/ruby/include -o
"./.ruby_inline/Inline_MyTest_cb89.so"
"C:/ruby_in_line/.ruby_inline/Inline_MyTest_cb89.c" -link
/LIBPATH:"c:/ruby/lib" /DEFAULTLIB:"msvcrt-ruby18.lib" /INCREMENTAL:no
/EXPORT:Init_Inline_MyTest_cb89: 512 (CompilationError)
Renamed ./.ruby_inline/Inline_MyTest_cb89.c to
/.ruby_inline/Inline_MyTest_cb89.c.bad from
c:/ruby/lib/ruby/gems/1.8/gems/RubyInline-3.6.3/lib/inline.rb:660:in
`inline'
from test2.rb:6

require "pp"
require "inline"
ENV['HOME']='./'
class MyTest
inline do |builder|
builder.c "
long factorial(int max) {
int i=max, result=1;
while (i >= 2) { result *= i--; }
return result;
}"
end
end
t = MyTest.new()
factorial_5 = t.factorial(5)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,186
Latest member
vinaykumar_nevatia

Latest Threads

Top