Hi guys, Im quite new to macruby and this is my first attempt at calling c functions in a static library I've linked into my application. I've successfully generated a bridgesupport file that loads just fine into the application first thing after loading frameworks in the rb_main.rb file.
At first I just want to call a simple function in the library, and so far to no avail. It fails with "Assertion failed: (cache->as.fcall.imp != NULL), function rb_vm_dispatch, file dispatcher.cpp, line 804.". This is what I have so far: dir_path = NSBundle.mainBundle.resourcePath.fileSystemRepresentation load_bridge_support_file File.join(dir_path,'mpg123.bridgesupport') mpg123_init Yeah, its the mpg123 library. The method is defined properly in the bridgesupport file: <function name='mpg123_init'> <retval type='i'/> </function> The library is linked in just fine, as I can call the same function in main.m without any issues, from the looks of it it seems like the function is actually available in the ruby universe, but that a reference to its address is missing or something, thus the assert on the fcall.imp thingie there. Any clues on what to do? Best regards, Patrick
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macruby-devel