Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re^3: XS from XS?

by afoken (Canon)
on Apr 10, 2010 at 18:33 UTC ( #834025=note: print w/replies, xml ) Need Help??

in reply to Re^2: XS from XS?
in thread XS from XS?

What about creating a nice set of C wrapper functions for the OS dependant LoadLibrary/GetProcAddr/FreeLibrary calls? Makefile.PL / Build.PL could decide which one to use, or panic if the OS is unknown / not implemented.

BTW: Linux seems to use dladdr, dlclose, dlerror, dlopen, dlsym, dlvsym, the first four are POSIX.1-2001, the other two are GNU extensions, according to the man page. So, if you use the Win32 API for Windows as a special case, and simply try to use dlopen and friends on other platforms, you could get the job done for most Unix platforms. Other platforms should fail and complain loudly during make.


Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Replies are listed 'Best First'.
Re^4: XS from XS?
by Anonymous Monk on Apr 11, 2010 at 01:04 UTC

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://834025]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (12)
As of 2021-01-22 13:43 GMT
Find Nodes?
    Voting Booth?