[CMake] CMake and portable dynamic library loading?
Alan W. Irwin
irwin at beluga.phys.uvic.ca
Sat Sep 30 14:47:33 EDT 2006
On 2006-09-30 18:12+0200 Thomas Arcila wrote:
> On Sat, 30 Sep 2006 17:34:58 +0200, Alan W. Irwin <irwin at beluga.phys.uvic.ca>
> wrote:
>> However, libltdl does not solve the issue of how to dynamically load
>> plug-ins on windows systems. (In our autotools days it built but did not
>> work properly for Cygwin and MinGW/MSYS, and I don't believe it has ever
>> been ported to bare windows.) So what do other projects do here for that
>> case? Is there a good free library to call on the windows side? I will
>> rely on Arjen, our PLplot windows expert, to interpret your ideas since I
>> don't have any windows experience myself.
>
> I think libltdl has support loading shared objects on windows-only systems
> (no cygwin)
The libtool documentation "info libtool ==> Using libltdl"
seems to confirm what you say:
"libltdl supports currently the following dynamic linking mechanisms:
* dlopen' (Solaris, Linux and various BSD flavors)
* shl_load' (HP-UX)
* LoadLibrary' (Win16 and Win32)
...
Excuse my windows ignorance, but is LoadLibrary the standard way to
dynamically load plug-ins for all the varieties of windows?
Based on the bad autotools experience noted above, we haven't yet evaluated
libltdl for loading plug-ins built by CMake for any kind of windows
platform. But if LoadLibrary is considered to be pretty standard, then we
will try harder to get plug-ins built properly for windows.
Are there any tricks to building plug-ins on windows that our developers
should be aware of?
Alan
__________________________
Alan W. Irwin
Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).
Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the
Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________
Linux-powered Science
__________________________
More information about the CMake
mailing list