Ok, I got the key. The module library should be located at auto/FooBar/FooBar.so instead of auto/FooBar.so...
============================================
Hi monks!
I'm writing a module with XS, which is a wrapper for another library. I made a simple test on my module:
1. link FooBar.pm to current directory,
2. link compiled FooBar.so to ./auto/,
3. then run perl -MFooBar, and it cries:
Can't find 'boot_FooBar' symbol in /usr/local/lib/libFooBar.so at - line 0.
This is strange, as boot_FooBar is compiled in the perl wrapper library, so it should not be searched in the original library.
I'm sure boot_FooBar is inside auto/FooBar.so, by using readelf -s:
46: 00000000000048a4 1049 FUNC GLOBAL DEFAULT 11 boot_FooBarIn addition, I did not use any perl helper modules (like Module::Build or ExtUtils::MakeMaker) to build my module. I did everything manually.
In reply to XS module cannot find boot_FooBar symbol by llancet
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |