Bob,
Bob Rossi wrote:
On windows, the dll goes into the bin dir, and the program uses the
proper dll. This is something that windows does reasonably well.
I'm not against Windows, but what makes you think Windows does it the
right way? Actually, the Win32 SxS (side-by-side) cache is the best
thing they've come up with for years to counter the problems they've had
with installing multiple DLL's of the same name on their systems.
(Remember the term "DLL HELL"? That's where it came from.) The SxS cache
allows you to (finally!) install mulitple versions of the same DLL's
into the system directory and have your app pick up the right one.
Unix's library versioning scheme has always had this ability naturally.
On linux, there is no such guarentee. So, I have come up with 2
solutions, and wonder if someone else has a better idea, or prefers one
over the others.
- Modify the automake to build the program as foo-bin, instead of foo
on unix platforms. Then, install a script called foo, that sets the
LD_LIBRARY_PATH and invokes foo-bin.
This approach seems like a lot of modification to the autotools in
order to get the tool to build with both static and dynamic version
of wxwidgets.
- Modify foo to know if it is using a shared wxwidgets library, and
dlopen it if it is. I haven't tested this yet, and don't even know
if it will work.
I recommend you put the library in the bin directory on mingw and in the
lib directory on other platforms. This is proper for both systems. What
it requires is an conditional section in your Makefile.am, checking for
mingw platform. The variable can be setup in your configure.ac script,
and exported using AM_CONDITIONAL.
John