0

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?

ckchai
  • 36
  • 4
  • how2 did you build the library? – Igor Sep 24 '17 at 15:26
  • I got lazy, so I used the prebuilt library from https://github.com/wxWidgets/wxWidgets/releases/download/v3.0.3/wxMSW-3.0.3_gcc492TDM_Dev.7z – ckchai Sep 24 '17 at 15:33
  • are you sure you downloaded a static build and not a dynamic one? I would just grab the sources and build everything as appropriate. – Igor Sep 24 '17 at 19:54
  • To be honest, I have no idea. The archive file contains both static (*.a) and dynamic dll versions of the same library, so I just assumed that I will be fine with using the .a ones. – ckchai Sep 25 '17 at 00:42
  • why not just copy the appropriate dll over where the executable is - at least for the time being. You still need to test your code, right? But I would say for a production/release you will need to compile the library yourself. Also you have no idea what options where supplied when the libraries was built. – Igor Sep 25 '17 at 03:16
  • Yup, the program runs OK once the needed dlls are copied to the folder. At least I know the code itself is working – ckchai Sep 25 '17 at 12:15

1 Answers1

0

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.

VZ.
  • 21,740
  • 3
  • 39
  • 42