I have tried for many hours to get wxWidgets to work in Codeblocks on Windows. I have tried building it and using the command line to build and run the examples in the samples folder successfully.
My problem is with codeblocks. No matter how I install wxWidgets and setup codeblocks I get the error
Code: Select all
-------------- Build: Debug in MyGui1 (compiler: GNU GCC Compiler)---------------
mingw32-g++.exe -LC:\wxWidgets-3.1.2\lib\gcc510TDM_x64_dll_Dev -LC:\wxWidgets-3.1.2\lib\gcc_lib -LC:\wxWidgets-3.1.2\lib\gcc_lib\mswu -L"C:\Program Files (x86)\CodeBlocks\MinGW\lib" -o bin\Debug\MyGui1.exe obj\Debug\MyGui1App.o obj\Debug\MyGui1Main.o obj\Debug\resource.res -mthreads -lwxbase31ud -lwxmsw31ud_core -lwxmsw31ud_core -lwxmsw31ud -mwindows
C:/TDM-GCC-32/bin/../lib/gcc/mingw32/5.1.0/../../../../mingw32/bin/ld.exe: cannot find -lwxmsw31ud
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
2 error(s), 0 warning(s) (0 minute(s), 0 second(s))
Always missing -lwxmsw31ud. This seems to be because the libwxmsw31ud.a doesn't exist. But why then, does it always try to look for it?
Building it like this works for running the samples
Code: Select all
mingw32-make -f makefile.gcc clean
mingw32-make -f makefile.gcc BUILD=debug SHARED=0 MONOLITHIC=0 UNICODE=1
Most recently I have followed the tutorial here to run wxWidgets with prebuilt binaries and followed the steps perfectly. This resulted in the build log seen above.
I have been searching the forum and internet extensively and have spent many hours on this, I am a little out of my depth here. Please help me get this working.