I’m venturing out into writing C extensions for the first time and have
hit a problem. I searche the list archives for answers but to no avail.
I have a simple Class called MyLib, which is defined in mylib.c . I use
the following extconf.rb to generate a makefile :
This generates a Makefile which works and compiles the lib but when I
try and use it I get the following error.
tester.rb:1:in `require’: (null) - ./mylib.so (LoadError)
However if I change the second line of exconf.rb to read
and modify tester.rb to require ‘MyLib’ instead of ‘mylib’ then
everything works. There are plenty of extensions with lowercase names
(gtk.so etc etc) so I’m sure it can be done, I’m just not sure how.
Anyone know where I’m going wrong?
Thanks in advance,