|
Boost Users : |
Subject: Re: [Boost-users] [serialization] plugin dll: What projectsettingsarereally needed?
From: Robert Ramey (ramey_at_[hidden])
Date: 2011-01-28 16:45:20
> George,
>
> Robert's solution was to change the linking of the project to pull in
> the serialization dll instead of linking it in statically in both
> projects. Unfortunately I can't release my software that way so it's
> a nonstarter for me :(
>
> It looks like in order for multiple DLLs to work you HAVE to link in
> the serialization library as a DLL otherwise it just won't work.
You CAN get around this. BUT you have to do some backflips to
make it work. Basically it includes making a module for your main
exe which explictly refers to the derived classes by name (and likely
their functions also). This will make sure they get sucked into the
main executable.
BUT, the microsoft linker is soooooooooooooo smart. It is
very successful at elminating code it doesn't think is actually invoked.
Worse, it's different between debug and release mode. To make
this work, you have to go through your project settings or link
switches or "decl" statements to make sure that code isn't purged
even though it doesn't look like it's used. In the serialization
library certain code is marked with decl("export") in the main
exe. This doesn't look like it makes sense - and it doesn't except
for the fact that the side effect of this is that the code isn't stripped.
See the "force_include.hpp" to see how this is done.
Robert Ramey
>
> Jeremy
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net