So right now I'm just trying out C/C++ extensions in Ruby and I'm having troubles while using the rake-compile gem. Right now all I'm trying to do is define a module, and it won't load the Init_* function because it says the symbol is undefined. But when I examine the .so file it's clearly listed in the symbol table:
nm -gC RSFML.so
0000000000201038 B __bss_start
w __cxa_finalize
0000000000201038 D _edata
0000000000201050 B _end
0000000000000744 T _fini
w __gmon_start__
00000000000005e0 T _init
w _ITM_deregisterTMCloneTable
w _ITM_registerTMCloneTable
w _Jv_RegisterClasses
U rb_define_module
0000000000201040 B RSFML
0000000000201048 B RSFML_Window
0000000000000725 T Init_RSFML()
Here's the error I get from the IRB:
irb -r ./lib/RSFML
/home/z/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require':LoadError: /home/z/Programming/ruby/RSFML-Gem/lib/RSFML.so: undefined symbol: Init_RSFML - /home/z/Programming/ruby/RSFML-Gem/lib/RSFML.so
I'm incredibly confused, and there doesn't seem to be much information on the matter of C extensions. Maybe there's something I'm missing? I have no idea.