From: Lars Uffmann on
Hi everyone!

I'm kinda trying to get to the root of the following problem and would
appreciate if someone could help me to tell apart wxWidgets dynamic from
static library builds:

I built wxWidgets on MinGW using
./configure --prefix=/mingw
make
make install

which had me ending up with the lib files in /mingw/lib:
libwx_base-2.8.dll.a

....

and
wxbase28_gcc_custom.dll
....

I can compile and link programs just fine as long as I want to use the
DLLs: the program will just expect the DLLs anywhere in the folders
contained in PATH variable (or local folder).

However, if I link the executable with g++ -static, I get the linker
complaining:
ld.exe: cannot find -lwx_base-2.8

So - since the .dll.a was confusing me anyways, I tried both renaming
the libraries to .a (since they seem to be the static versions) and
linking from the MSYS shell, supplying the libraries as -lwx_base-2.8.dll
Both solutions "work" - meaning the linker will not complain, and
produce an executable. However, this executable will be the very same as
if I never used the -static linker flag, and require the DLL-files to run.

Can anyone tell me why my mingw gnu c++ linker is not creating the
statically linked executable? Maybe I have not build the correct
wxWidgets libraries? The .dll.a files start with !<arch> - which seems
to be the correct file type for static libaries, so I am quite at a loss
here...

Thanks in advance!

Lars
From: Lars Uffmann on
Hi Werner,

Werner Smekal wrote:
> In order to obtain static libraries you need to configure wxWidgets like
> this:
> ./configure --prefix=/mingw --disable-shared

Thank you! This was exactly what I needed. Everything is working as
intended now. Mind if I mention you with full name & newsgroup in the
credits of my MSYS/MinGW + Eclipse CDT + wxWidgets (+ boost + xerces-c)
installation guide? :)

Best Regards,

Lars
From: Werner Smekal on
Hi Lars,

> Thank you! This was exactly what I needed. Everything is working as
> intended now. Mind if I mention you with full name & newsgroup in the
> credits of my MSYS/MinGW + Eclipse CDT + wxWidgets (+ boost + xerces-c)
> installation guide? :)

Sure, no problem ;)

regards,
Werner