No such thing as a small change | |
PerlMonks |
Re^4: With Inline::C, how to link to external library? (;)by stevieb (Canon) |
on Aug 08, 2016 at 14:38 UTC ( [id://1169359]=note: print w/replies, xml ) | Need Help?? |
You sent me down the right path from what I can tell, tye. On a different computer, different version of Perl (5.18 vs 5.24 which I was using yesterday), I was having the exact same issue, but I eventually tracked down something that fixed the issue, albeit I'm sure it's wrong. In /usr/lib/perl/5.18/CORE/XSUB.h which the error was referencing (same file, different location on yesterday's test), I made this change (ie. I removed void):
I also slightly changed up my Inline::C test code to this (which also breaks without the above change):
It works! If I remove the libs directive in the use Inline::C ... statement, I get undefined symbol PinMode, which I fully expect. Put it back in, and voila... things work. Without removing the void identifier, it breaks when trying to use ANY external shared library, whether it can be found or not. This is easily reproduceable... just try to include a library that does or doesn't exist on the system. As soon as it tries to do EXTERN type stuff, the line that I removed void from is triggered, and breaks. Does my change look proper to you? Is this a bug? I'm not sure how to test this without using Inline::C to see if it's a global XS thing, or just Inline thing. After I get some more feedback, I'll be glad to test further.
In Section
Seekers of Perl Wisdom
|
|