|
|
| Keep It Simple, Stupid | |
| PerlMonks |
Re: Dynaloader/XS: sharing C symbols across shared objectsby syphilis (Archbishop) |
| on Jun 10, 2008 at 07:06 UTC ( [id://691166]=note: print w/replies, xml ) | Need Help?? |
|
+sub dl_load_flags { 0x01 } Wow !! I didn't realize that things were *that* simple on nix type operating systems. (I've just checked on my old mandrake-9.1 box, and things really *are* that simple.) There's certainly more than that required on Windows - though I realise that's probably something that's not an issue for the OP. For a start, on Win32 we need to have the dll export the symbols - hence the usefulness of 'FUNCLIST'. (I was forgetting that probably wouldn't be an issue on most other operating systems.) Secondly, on windows, there's a need to be able to resolve all symbols at compile-time. But, on my linux box, I've just realised there's no such condition to be met. As an example, the following Inline::C script runs fine on linux, but fails to build on windows: On linux (with gcc) that outputs simply Compiled fine, but on windows (using the MinGW port of gcc) the build phase fails with: This is, no doubt, old news to many here ... but the starkness of the differences took me somewhat by surprise. Cheers, Rob
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||||||