Using GCC, wxbase28, wxmsw28, and wxmsw28_adv are all that I need to build and run one of my wxWidgets projects using the wxWidgets DLLs. None of the additional libraries from the wxWidgets lib directory appear to be necessary, nor do any of the Win32 libs.
"Read my lips." If this were not the case, I'd expect the following command line, copied and pasted directly from the Build log, to kick up a few errors:
mingw32-g++.exe -LE:\Libraries\wxMSW-2.8.0\lib\gcc_dll -o test.exe main.o app.o -lwxmsw28d_core -lwxbase28d -lwxmsw28d_adv
But there are none, and the resulting executable works without problems. So also does the more complex project I alluded to earlier, which has many more files' worth of code. You might notice that MinGW's "-mwindows" option is unnecessary to successfully build and run it.
Try equivalent linker option of /NODEFAULTLIB (exists in MSVC and I don't know whether there are any equivalent option in GCC) in gcc and see which libraries it asks.
The option, in case you're curious, is "-nodefaultlibs". It brings in a host of missing references to some objects in the CRT, C++ operators new and delete, and various objects relating to structured exceptions. None are present in your extraneous Win32 libraries.
I mentioned it to inform you that you may not see the couple of libraries that are added to your wxWidgets project even with the old wizard. These libraries are - comctl32, gdi32, ole32, oleaut32, uuid but you will not see them until you open the Code::Blocks Project file with Notepad.
The Build options visible in C::B for each of my wxWidgets projects mirror the options in the .cbp file when viewed in Notepad. The wxWidgets libraries appear in the Debug or Release build options, and the Win32 libraries in the overarching project build options. Modifying the libraries in either place and saving the project results in the expected changes to both the project file and the resulting command lines during the build process.
Some further explanation:If you think about it, that's the way the wxWidgets DLLs should work. wxWidgets presents an entirely new interface to its users that completely hides Win32, such that no Win32 function calls exist in the wxWidgets headers. If your app's code contains no Win32 function calls, it has no dependencies on the Win32 libraries; every Win32 function call happens within the code in the wxWidgets DLL, and the resulting dependencies are resolved when the DLL is linked rather than when your app is.