Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
[ANN] RubyInline 3.6.3 Released
Ryan Davis
4/27/2007 10:35:00 PM
RubyInline version 3.6.3 has been released!
http://rubyforge.org/projects/r...
http://www.zenspider.com/ZSS/Products/R...
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/r...
http://www.zenspider.com/ZSS/Products/R...
2 Answers
Haoqi Haoqi
4/28/2007 3:31:00 AM
0
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)
--
Posted via
http://www.ruby-...
.
Haoqi Haoqi
4/28/2007 3:37:00 AM
0
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)
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
[ANN] RubyInline 3.6.3 Released
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password