I'm still playing and testing things with C::B hoping I can eventually write a GUI application using wxWidgets. I have a stand-alone installation of MinGW that I use to compile wxWidget projects. I can create a new wxWidgets project and as soon as that project opens I can hit Build and Run and a few seconds later I will get the minimal wxWidgets application to open. Great.
I've also created a completely different project, this time a console one, and used the ImageMagick library to build different command line utilities. That too compiles (and works) with the stand-alone MinGW compiler. No problems.
Now comes the failed trick: ultimately I want to create a GUI application that uses ImageMagick. I already know I can make a GUI application with just wxWidgets (I ran through all of their online tutorials already), and I can make a stand-alone console (or command line) application using ImageMagick's library. But combining the two is proving to be problematic. So here's what I did:
Start with a new wxWidgets project:
File -> New Project -> Select wxWidgets Project
Picked wxWidgets 3.0.x
(since that's what I have installed)For Project title I used a random name, 'wxTest' and Author/E-mail/Website are also filled accordingly
Preferred GUI Builder is set to wxSmith
Application Type is set to Frame Based
wxWidgets' location is set to $(#wx)
(this global variable is configured to the same location where wxWidgets-3.0.0 is installed)Compiler is set to the stand-alone MinGW install on this machine
Both Debug and Release configurations are enabled with default values
Under wxWidgets Library Settings I have wxWidgets as a monolithic library and unicode enabled (DLL is not checked.)
Under Miscellaneous settings I have Create and use precompiled header (PCH) enabled. The Create Empty Project as well as Configure Advance Options are not checked.
-- At this point the project is open and I can hit Build and Run and it compiles and launches the (empty) application.Now I will add the same settings for ImageMagick (hereafter referred to as IM) that I did for the console programs to compile:
(Note, I have the IM libraries installed in T:\ImageMagick-6.8.5)Project -> Properties -> Build targets
By default 'Debug' is selected so we'll play with that for now.Click the Build options... button
The Selected compiler is still set to the stand-along MinGW compiler
Under Compiler settings -> #defines, I added the required define for IM:
MAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16
Under Linker settings, it already lists several libwx* libraries. I added the required IM libraries specific for MinGW32:
T:\ImageMagick-6.8.5\lib\libMagick++-6.Q16.dll.a
T:\ImageMagick-6.8.5\lib\libMagickCore-6.Q16.dll.a
T:\ImageMagick-6.8.5\lib\libMagickWand-6.Q16.dll.a
Under Search directories -> Compiler it already lists one wxWidgets line. I added the required IM include location: T:\ImageMagick-6.8.5\include\ImageMagick-6
Under Search directories -> Linker it already lists the wxWidgets line. I added the required IM library location: T:\ImageMagick-6.8.5\lib
-- At this point I have configured this project the same exact way as I did the other, console programs that also use IM.I performed a Build -> Clean then a Build and Run. It will successfully compile, no errors, no warnings. However when it tries to run the executable, I get errors. First error is that the executable is missing libMagick++-6.Q16-1.dll in its path. No problem, I can put it there. Then it complains about missing 'pthreadGC2.dll' and it's at this point that I'm lost.
Where is that dll being called from, and why? Why is it when I create a stand-alone wxWidgets project, I never get that error? In fact, I went through all of their tutorials online and the only libraries it ever wanted me to have present were 'libstdc++-6.dll' and 'libwinpthread-1.dll'. Both of those come from MinGW so it's a simple matter of copying them over into the executable folder and it works. And for the console applications that use IM, all I had to do there was copy the required 'libMagick++-6.Q16-1.dll' into the folder and done. But where's this 'pthreadGC2.dll' coming from? And why does it only pop up when I try to build a wxWidgets GUI application with the IM library? I haven't even included the IM header file yet, just setup the various paths and settings for it to work.
Looking at both the MinGW stand-alone install, as well as my system as a whole, I can't find that pthreadGC2.dll file anywhere. Nor can I figure out what specifically is wanting to use it or how to fix it (other than to download it from somewhere on the net, something I'm not willing to do simply because I don't see why I would need it when separately, both scenarios work without.)
Any ideas and/or suggestions anyone?