I'm currently trying to add a UI to my already complete program. So I've been searching on the internet for like 2 hours and still don't get how to use wxWidgets after building it using MinGW.
I tried using -I
arguments for the gcc compilers so I could include the stuff that I apparently built and it can compile the program, but I can't seem to open the .exe file because it says it's incompatible with my current Windows OS.
I feel like I'm missing something here. I've read instructions on GitHub, but it all stops at how to build WxWidgets on MinGW and it doesn't explain anywhere how to use it after building it.
EDIT: @DavidC.Rankin Tried it your way and even tried using the make file like this:
C:\wxWidgets-3.1.1\samples\minimal>mingw32-make -f makefile.gcc
But now it gives me errors like this:
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe: cannot find -lwxmsw31ud_core
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe: cannot find -lwxbase31ud
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe: cannot find -lwxtiffd
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe: cannot find -lwxjpegd
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe: cannot find -lwxpngd
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe: cannot find -lwxexpatd
collect2.exe: error: ld returned 1 exit status
makefile.gcc:221: recipe for target 'gcc_mswud\minimal.exe' failed
mingw32-make: *** [gcc_mswud\minimal.exe] Error 1
It seems to be that the linker is not working properly. But I have no idea why.
EDIT2: for the record. Here is the command I used to build wxWidgets.
C:\wxWidgets-3.1.1\build\msw>mingw32-make -f makefile.gcc CFG=32 CPPFLAGS="-DHAVE_TR1_TYPE_TRAITS" CXXFLAGS="-Wno-deprecated-declarations -Wno-unused-local-typedefs -fno-keep-inline-dllexport" MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=release`
Basically, what you need to do is add the wxWidgets GUI code to your program.
Then when you done it, issue exactly
the same command you used to build the wxWidgets in order to build you software. You will also need to check the link VZ (Vadim) pointed you to, because it contains an important pieces of info.
If you get an error during the build/link phases - please give the complete error message.