Hello everybody !
I'm trying to compile a wxWidgets Windows app with MinGW. To do this I'm using the makefile.gcc provided with the minimal sample.
When I compile the minimal example with mingw32-make -f makefile.gcc BUILD=release SHARED=1 UNICODE=1
all work perfectly. However if I use Code::Blocks and configure the project to use the makefile (Build project/target: $make -f $makefile BUILD=release SHARED=1 UNICODE=1
) the compilation work properly, but the program crashes when starting.
Moreover the objects files and the executables are different between the two ways. I can't find out a reason why.
Could you help me?
Thank you in advance,
Simac
That's a part of the problem: nothing differs. The build log is exactly the same with CB and the makefile:
With the makefile:windres --use-temp-file -i../../samples/sample.rc -ogcc_mswudll\minimal_sample_rc.o --define __WXMSW__ --define NDEBUG --define _UNICODE --include-dir .\..\..\lib\gcc_dll\mswu --include-dir ./../../include --include-dir . --define WXUSINGDLL --include-dir ./../../samples --define NOPCH
g++ -c -o gcc_mswudll\minimal_minimal.o -O2 -mthreads -DHAVE_W32API_H -D__WXMSW__ -DNDEBUG -D_UNICODE -I.\..\..\lib\gcc_dll\mswu -I.\..\..\include -W -Wall -I. -DWXUSINGDLL -I.\..\..\samples -DNOPCH -Wno-ctor-dtor-privacy -s -MTgcc_mswudll\minimal_minimal.o -MFgcc_mswudll\minimal_minimal.o.d -MD -MP minimal.cpp
g++ -o gcc_mswudll\minimal.exe gcc_mswudll\minimal_sample_rc.o gcc_mswudll\minimal_minimal.o -mthreads -L.\..\..\lib\gcc_dll -Wl,--subsystem,windows -mwindows -lwxmsw30u_core -lwxbase30u -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lwxregexu -lwxexpat -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lwininet -s
With CB:<html>
<head>
<title>minimal build log</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head>
<body>
<tt>
Build started on: <u>03-06-2017 at 17:11.03</u><br />
Build ended on: <u>03-06-2017 at 17:11.07</u><p />
<b>-------------- Build: release in minimal (compiler: GNU GCC Compiler)---------------</b><br />
mingw32-make.exe -f makefile.gcc BUILD=release SHARED=1 UNICODE=1 <br />
windres --use-temp-file -i../../samples/sample.rc -ogcc_mswudll\minimal_sample_rc.o --define __WXMSW__ --define NDEBUG --define _UNICODE --include-dir .\..\..\lib\gcc_dll\mswu --include-dir ./../../include --include-dir . --define WXUSINGDLL --include-dir ./../../samples --define NOPCH<br />
g++ -c -o gcc_mswudll\minimal_minimal.o -O2 -mthreads -DHAVE_W32API_H -D__WXMSW__ -DNDEBUG -D_UNICODE -I.\..\..\lib\gcc_dll\mswu -I.\..\..\include -W -Wall -I. -DWXUSINGDLL -I.\..\..\samples -DNOPCH -Wno-ctor-dtor-privacy -s -MTgcc_mswudll\minimal_minimal.o -MFgcc_mswudll\minimal_minimal.o.d -MD -MP minimal.cpp<br />
g++ -o gcc_mswudll\minimal.exe gcc_mswudll\minimal_sample_rc.o gcc_mswudll\minimal_minimal.o -mthreads -L.\..\..\lib\gcc_dll -Wl,--subsystem,windows -mwindows -lwxmsw30u_core -lwxbase30u -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lwxregexu -lwxexpat -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lwininet -s<br />
<font color="#0000ff">Process terminated with status 0 (0 minute(s), 4 second(s))</font><br />
<font color="#0000ff">0 error(s), 0 warning(s) (0 minute(s), 4 second(s))</font><br />
</tt>
</body>
</html>
It is very strange !