Hi,
I'm using Windows and downloaded MinGW, wxWidgets (2.8.10) and Code::Blocks (8.02) separately. All installed fine and work OK. I built wxWidgets (and the samples) using the following command line:
mingw32-make -f makefile.gcc BUILD=release MONOLITHIC=1 SHARED=0 UNICODE=1
When I run any of the wxWidgets samples I require the mingwm10.dll because the default configuration for 2.8.10 includes USE_THREADS being defined to 1.
When I create a wxWidgets project using C::B I go through the wizard and point to my wxWidgets build. Create the project, build and run and it runs fine. However, I have noticed that I don't need the mingwm10.dll.
I turned on the build logging and output of the command line and I can see that C::B invokes g++ using the -mthread option to compile the C++ files into object files, but it doesn't include the -mthread option when linking. The wxWidget sample makefiles all have the -mthread option when linking.
My questions are therefore:
1) Is this done by C::B on purpose? When I try the same thing from the command line with the wxWidget samples (not using the -mthread option when linking) I get exceptions when the sample is executed.
2) If it is done on purpose, how does it know when to include or exclude the -mthread option? Based on the wxWidget libs included? Or is it left up to the programmer?
Thanks.