P is for Practical | |
PerlMonks |
Re^3: XS linking problemby GrandFather (Saint) |
on Sep 23, 2017 at 22:12 UTC ( [id://1199969]=note: print w/replies, xml ) | Need Help?? |
No need to stoop that low! Instead prefix the functions you want to have C linkage with extern "C":
If you are forward declaring the function in a header you don't need to provide the extern declaration in the definition. Now you can provide a C API and still have the power of C++ to go forth and conquer the world.
Premature optimization is the root of all job security
In Section
Seekers of Perl Wisdom
|
|