|
Boost-Build : |
From: Rene Rivera (grafik.list_at_[hidden])
Date: 2004-02-26 18:07:22
mronion13 wrote:
> Hey,
>
> I am trying to come up with a simple way to link an extension DLL to
> my main program using Boost.Build v1, with the intention that my
> program will load this DLL when it is needed using LoadLibrary
> (equivalent to dlopen in linux). This is easily accomplished in linux
> by passing the -E flag to the linker which exports all symbols from
> the main program so the run-time linker can resolve the undefined
> symbols in the shared object. However, in windows, to compile the
> plugin DLL, you must link against the import library from the main
> program that is generated when the main program is compiled. My main
> program also has a library it links from (a core library with some
> core functions).
I understand what you are attempting to do.. But AFAIK there is no way to do
that in Windows. Simply put EXEs can't "export" symbols as DLLs do. There is
no back binding from loaded DLLs to the EXE. Of course correct me if this is
not what you are trying to do, or if you know better ;-)
Also unless you are doing something special BBv1 doesn't generate any form of
link library when linking EXEs, only when linking DLLs.
The usual arrangement for plugin systems is to have the functionality they
need in common with the EXE to be in a separate DLL that both link to. This is
what Boost.Python does.
..If you do know better and are actually producing a link library for the
EXE.. One possible way to link to it is to use the <library-file> feature to
link to it as an external library. Possibly as such:
dll plugin_1
: <dll>main_core
: <debug><library-file>bin/main_proj/main_prog.exe/vc7/debug/main_prog.lib
;
..or something like that.
HTH.
-- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com - 102708583/icq
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk