G
Gary
I'm using cygwin to try to build an extension in C++. I've stripped
down the pickaxe book's example (http://www.rubycentral.com/pickaxe/
ext_ruby.html) to the bare minimum. It looks like:
#include "ruby.h
VALUE cTest;
void Init_Test() {
cTest = rb_define_class("Test", rb_cObject);
}
If I name the file Test.c, it works nicely. If I name the file
Test.cpp I get the following error when I try to require the file in
irb.
LoadError: No such file or directory - /usr/lib/ruby/site_ruby/1.8/
i386-cygwin/Test.so
from /usr/lib/ruby/site_ruby/1.8/i386-cygwin/Text.so
from (irb):1
For the whole proceedure I do:
make clean
ruby extconf.rb
make
make install
irb
require "Test"
Any helpful ideas?
down the pickaxe book's example (http://www.rubycentral.com/pickaxe/
ext_ruby.html) to the bare minimum. It looks like:
#include "ruby.h
VALUE cTest;
void Init_Test() {
cTest = rb_define_class("Test", rb_cObject);
}
If I name the file Test.c, it works nicely. If I name the file
Test.cpp I get the following error when I try to require the file in
irb.
LoadError: No such file or directory - /usr/lib/ruby/site_ruby/1.8/
i386-cygwin/Test.so
from /usr/lib/ruby/site_ruby/1.8/i386-cygwin/Text.so
from (irb):1
For the whole proceedure I do:
make clean
ruby extconf.rb
make
make install
irb
require "Test"
Any helpful ideas?