Boost logo

Boost-Build :

Subject: [Boost-build] Jamfile setup for load on demand DLLS
From: Robert Ramey (ramey_at_[hidden])
Date: 2009-12-21 13:03:55

Here is a small piece of code which is part of one of my serialization

HINSTANCE hDLL; // Handle to DLL
hDLL = LoadLibrary("dll_polymorphic_derived2.dll");
BOOST_CHECK_MESSAGE((0 != hDLL), "Failed to find/load
dll_polymorphic_derived2" );

This runs successfully when I test from the msvc ide where the file
has been placed in the same directory as the executable. So far so good.

When I update my Jamfile.v2 with

lib dll_polymorphic_derived2_lib


[ test-bsl-run test_dll_plugin : : dll_polymorphic_derived2_lib :
<runtime-link>shared ]

It's not clear to me where the dll is located. That is, should the
following be changed?

hDLL = LoadLibrary("dll_polymorphic_derived2.dll");

and if so to what?.

Also, I make a new version of the above code for *nix which uses dlopen,
dlclose, etc.
But again, I'm not sure what the path names should be.

Any help appreciated.

Robert Ramey

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at