I've built wxWidgets 2.8.12 using using the mingw32 version of GNU Make 3.82 on Windows 7 x64 SP1. The commands used were
cd "C:\libraries\wxWidgets-2.8.12\build\msw"
mingw32-make -f makefile.gcc CXXFLAGS="-fno-keep-inline-dllexport" BUILD=debug SHARED=1 MONOLITHIC=1 UNICODE=1 clean
mingw32-make -f makefile.gcc CXXFLAGS="-fno-keep-inline-dllexport" BUILD=debug SHARED=1 MONOLITHIC=1 UNICODE=1
rename gcc_mswuddll debug
mingw32-make -f makefile.gcc CXXFLAGS="-fno-keep-inline-dllexport" BUILD=release SHARED=1 MONOLITHIC=1 UNICODE=1 clean
mingw32-make -f makefile.gcc CXXFLAGS="-fno-keep-inline-dllexport" BUILD=release SHARED=1 MONOLITHIC=1 UNICODE=1
rename gcc_mswudll release
So in the "C:\libraries\wxWidgets2.8.12\build\msw" directory I have a folder named "release" and a folder named "debug."
I set the wxWidgets base directory variable to "C:\libraries\wxWidgets-2.8.12" and try to create a new wxWidgets project, checking the "wxWidgets is built as a monolithic library" and "Enable unicode" boxes along the way. On clicking "Next" to start the project, I'm greeted with the warning "A matching debug configuration cannot be found in the wxWidgets directory you specified. This means the debug target of your project will not build."
I've searched the forum, but all the answers I've run across have had to do with the libraries not actually being built. I've also tried copying the "debug" and "release" folders I built into the base directory with the same results. I'm sure I'm just missing something silly, but I can't for the life of me figure out what it is. Any help would be appreciated.
When I click "Next" through the "matching debug configuration..." warning, I get an identical warning for the Release build. Attempts to compile give me:
-------------- Build: Debug in test ---------------
Compiling: testApp.cpp
In file included from C:\libraries\wxWidgets-2.8.12\include/wx/defs.h:21:0,
from C:\libraries\wxWidgets-2.8.12\include/wx/event.h:15,
from C:\libraries\wxWidgets-2.8.12\include/wx/app.h:20,
from M:\cppstuff\wxfirst\test\testApp.h:13,
from M:\cppstuff\wxfirst\test\testApp.cpp:18:
C:\libraries\wxWidgets-2.8.12\include/wx/platform.h:196:22: fatal error: wx/setup.h: No such file or directory
compilation terminated.
Process terminated with status 1 (0 minutes, 0 seconds)
1 errors, 0 warnings
I have setup.h files in several directories within the wxWidgets library directory, but copying each of those into "C:\libraries\wxWidgets-2.8.12\include/wx/" gives me various errors as well.
Copying C:\libraries\wxWidgets-2.8.12\include\msvc\wx\setup.h, C:\libraries\wxWidgets-2.8.12\include\wx\univ\setup.h, C:\libraries\wxWidgets-2.8.12\include\wx\msw\setup.h, C:\libraries\wxWidgets-2.8.12\include\wx\msw\wince\setup.h, C:\libraries\wxWidgets-2.8.12\lib\gcc_dll\mswu\wx\setup.h, C:\libraries\wxWidgets-2.8.12\lib\gcc_dll\mswud\wx\setup.h, or C:\libraries\wxWidgets-2.8.12\contrib\include\wx\deprecated\setup.h to "C:\libraries\wxWidgets-2.8.12\include/wx/" results in
-------------- Build: Debug in test ---------------
Linking executable: bin\Debug\test.exe
c:/mingw/bin/../lib/gcc/mingw32/4.7.0/../../../../mingw32/bin/ld.exe: cannot find -lwxmsw28u
c:/mingw/bin/../lib/gcc/mingw32/4.7.0/../../../../mingw32/bin/ld.exe: cannot find -lwxpng
c:/mingw/bin/../lib/gcc/mingw32/4.7.0/../../../../mingw32/bin/ld.exe: cannot find -lwxjpeg
c:/mingw/bin/../lib/gcc/mingw32/4.7.0/../../../../mingw32/bin/ld.exe: cannot find -lwxtiff
c:/mingw/bin/../lib/gcc/mingw32/4.7.0/../../../../mingw32/bin/ld.exe: cannot find -lwxzlib
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
5 errors, 0 warnings
Added "$(#wx.lib)\gcc_dll\mswu" and "$(#wx.lib)\gcc_dll\mswud" as compiler search directories and "$(#wx.lib)\gcc_dll" as a linker search directory and it all compiles now. It still gives me the warnings about matching configurations when creating a new project, but I guess that's just a minor annoyance at this point.
Build log:
Build started on: 26-06-2012 at 10:20.30
Build ended on: 26-06-2012 at 10:20.35
-------------- Build: Debug in test2 ---------------
mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DwxUSE_UNICODE -Wno-attributes -Wall -g -IC:\libraries\wxWidgets-2.8.12\\include -IC:\libraries\wxWidgets-2.8.12\\contrib\include -IC:\libraries\wxWidgets-2.8.12\\lib\gcc_lib\mswu -IC:\libraries\wxWidgets-2.8.12\lib\gcc_dll\mswu -IC:\libraries\wxWidgets-2.8.12\lib\gcc_dll\mswud -c C:\Users\laj\Documents\cpp_problems\test2\test2App.cpp -o obj\Debug\test2App.o
mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DwxUSE_UNICODE -Wno-attributes -Wall -g -IC:\libraries\wxWidgets-2.8.12\\include -IC:\libraries\wxWidgets-2.8.12\\contrib\include -IC:\libraries\wxWidgets-2.8.12\\lib\gcc_lib\mswu -IC:\libraries\wxWidgets-2.8.12\lib\gcc_dll\mswu -IC:\libraries\wxWidgets-2.8.12\lib\gcc_dll\mswud -c C:\Users\laj\Documents\cpp_problems\test2\test2Main.cpp -o obj\Debug\test2Main.o
windres.exe -i C:\Users\laj\DOCUME~1\CPP_PR~1\test2\resource.rc -J rc -o obj\Debug\resource.res -O coff -IC:\libraries\wxWidgets-2.8.12\\include -IC:\libraries\wxWidgets-2.8.12\\lib\gcc_lib\mswu
mingw32-g++.exe -LC:\libraries\wxWidgets-2.8.12\\lib\gcc_lib -LC:\libraries\wxWidgets-2.8.12\lib\gcc_dll -o bin\Debug\test2.exe obj\Debug\test2App.o obj\Debug\test2Main.o obj\Debug\resource.res -mthreads -lwxmsw28u -lwxpng -lwxjpeg -lwxtiff -lwxzlib -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lcomctl32 -lwsock32 -lodbc32 -mwindows
Output size is 428.18 KB
Process terminated with status 0 (0 minutes, 4 seconds)
0 errors, 0 warnings
Still getting the dll error at runtime.
edit: Found the .dll files in "C:\libraries\wxWidgets-2.8.12\lib\gcc_dll". Made sure the "Use wxWidgets DLL", "wxWidgets is built as a monolithic library", and "Enable unicode" boxes were all checked at the end of project creation. Between this and the added compiler & linker search directories mentioned above, warnings are gone and code compiles and runs as expected. Thanks.
edit2: Unsure if it's possible/how to mark solved.