Created
June 21, 2012 19:30
-
-
Save djberg96/2967972 to your computer and use it in GitHub Desktop.
Trouble with RubyInline and VS++
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Visual Studio 10 | |
Windows 7 | |
I installed RubyInline without (apparent) issue. Tried this code next: | |
# stuff.rb | |
require 'inline' | |
class Array | |
inline :C do |builder| | |
builder.c(%Q{ | |
static VALUE stuff(VALUE self){ | |
return INT2FIX(7); | |
} | |
}) | |
end | |
end | |
p [1,2,3,4].stuff | |
Got this: | |
c:\Users\djberge\Programming\Ruby\Inline>ruby average.rb | |
cl : Command line warning D9035 : option 'o' 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 D9035 : option 'o' 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 D9035 : option 'o' has been deprecated and will be removed in a | |
future release | |
cl : Command line warning D9002 : ignoring unknown option '-incremental:no' | |
cl : Command line warning D9002 : ignoring unknown option '-debug' | |
cl : Command line warning D9002 : ignoring unknown option '-dll' | |
cl : Command line warning D9002 : ignoring unknown option '-incremental:no' | |
cl : Command line warning D9002 : ignoring unknown option '-debug' | |
cl : Command line warning D9002 : ignoring unknown option '-Lc:/usr/lib' | |
cl : Command line warning D9024 : unrecognized source file type '$(LIBPATH)', object file | |
assumed | |
c:/usr/lib/ruby/gems/1.9.1/gems/RubyInline-3.11.2/lib/inline.rb:599:in `build': error exec | |
uting "cl -nologo -LD -incremental:no -debug -opt:ref -opt:icf -dll $(LIBPATH) -MD -Zi - | |
W2 -wd4996 -we4028 -we4142 -O2sy- -Zm600 -incremental:no -debug -opt:ref -opt:icf -I c:/u | |
sr/include/ruby-1.9.1 -I c:/usr/include/ruby-1.9.1/i386-mswin32_100 -I c:/usr/include -Lc: | |
/usr/lib -o \"C:/Users/djberge/.ruby_inline/ruby-1.9.1/Inline_Array_c13d88cb4cb02003daedb8 | |
a84e5d272a.so\" \"C:/Users/djberge/.ruby_inline/ruby-1.9.1/Inline_Array_c13d88cb4cb02003da | |
edb8a84e5d272a.c\" -link /LIBPATH:\"c:/usr/lib\" /DEFAULTLIB:\"msvcr100-ruby191.lib\" /I | |
NCREMENTAL:no /EXPORT:Init_Inline_Array_c13d88cb4cb02003daedb8a84e5d272a": pid 12248 exit | |
2 (CompilationError) | |
Renamed C:/Users/djberge/.ruby_inline/ruby-1.9.1/Inline_Array_c13d88cb4cb02003daedb8a84e5d | |
272a.c to C:/Users/djberge/.ruby_inline/ruby-1.9.1/Inline_Array_c13d88cb4cb02003daedb8a84e | |
5d272a.c.bad | |
from c:/usr/lib/ruby/gems/1.9.1/gems/RubyInline-3.11.2/lib/inline.rb:830:in `inlin | |
e' | |
from average.rb:4:in `<class:Array>' | |
from average.rb:3:in `<main>' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment