Search code examples
static-librarieswxwidgetsstatic-linking

Standalone wxWidgets app asking for linked library


wxWidgets newbie here. Trying to compile an example code as a standalone program, and I'm sure that I had all the required static libs included

Here's the compilation log. I'm using CodeBlocks with mingw32

-------------- Build: Debug in wxRaw (compiler: GNU GCC Compiler)---------------
mingw32-g++.exe -Wall -pipe -mthreads -D__MINGW32__ -D__WXMSW__ -DwxUSE_UNICODE -g -D__WXDEBUG__ -IC:\wxWidgets\lib\gcc_lib\mswud -IC:\wxWidgets\include -c C:\Users\user\Documents\CodeBlocks\wxRaw\MainApp.cpp -o obj\Debug\MainApp.o
mingw32-g++.exe -LC:\wxWidgets\lib\gcc_lib -o bin\Debug\wxRaw.exe obj\Debug\MainApp.o   -lwxbase30ud -lwxmsw30ud_core -lwxbase30ud_net -lwxbase30ud_xml -mwindows
Output file is bin\Debug\wxRaw.exe with size 1.43 MB
Process terminated with status 0 (0 minute(s), 6 second(s))
0 error(s), 0 warning(s) (0 minute(s), 6 second(s))

But still, the program still nags me for wxbase30ud_gcc492TDM.dll. Anyone has any idea?


Solution

  • You need wxWidgets DLLs to run your application. The .a files are not static libraries but import libraries and don't contain any code (just look at their size).

    If you want to build statically, you can easily do it by building wxWidgets yourself, but you can't use the provided binary distribution in this case.