Author Topic: WxWidgets and Code:blocks beginner-Do I build 64 or 32 bit?  (Read 747 times)

Offline djsb

  • Single posting newcomer
  • *
  • Posts: 8
Hi,
I'm new to both code:blocks AND wxWidgets. I'm using Windows 10 64 bit. I have downloaded and installed both wxMSW-3.0.4-Setup.exe AND codeblocks-17.12mingw-setup.exe. I will to begin with be compiling trivial Wxwidgets example code and it does not matter if it is 32 or 64 bit (as long as it will run on my 64 bit windows 10 machine that is). Later I would like to contribute to open source projects that have both 32 and 64 bit builds (I use 64 bit when I can).
Is it better for me to start from a 32 bit build environment or use 64 bit from the start. I want to keep things simple to start with.
I have NOT compiled WxWidgets yet as I thought it best to seek advice on here first. Hope someone can help. Thanks.

David.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11827
    • Travis build status
Re: WxWidgets and Code:blocks beginner-Do I build 64 or 32 bit?
« Reply #1 on: May 05, 2019, 11:48:03 am »
Start with 32bit, if you want to have no problems with the debugger. Currently it is not possible to pause/interrupt the debugger if you're mixing 32 and 64 bit CodeBlocks, gdb and application executables.

Also you'll probably want to switch to some newer compiler than the one installed with codeblocks. Our project would probably move to the compilers provided by the mingw-w64 project.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline djsb

  • Single posting newcomer
  • *
  • Posts: 8
Re: WxWidgets and Code:blocks beginner-Do I build 64 or 32 bit?
« Reply #2 on: May 05, 2019, 12:12:36 pm »
Thank you for your reply.
I also have a separate directory (C:\MinGW and C:\MinGW\Bin in my path). Is it best to remove the existing MinGW installation and replace the PATH with C:\Program Files (x86)\CodeBlocks\MinGW\bin?

Offline djsb

  • Single posting newcomer
  • *
  • Posts: 8
Re: WxWidgets and Code:blocks beginner-Do I build 64 or 32 bit?
« Reply #3 on: May 05, 2019, 04:21:24 pm »
Ok. I've removed the existing MinGW directory and I'm just using the MinGW that was included in the download.
I get this error
Code: [Select]
Microsoft Windows [Version 10.0.17763.437]
(c) 2018 Microsoft Corporation. All rights reserved.

C:\WINDOWS\system32>cd C:\wxWidgets-3.0.4\build\msw

C:\wxWidgets-3.0.4\build\msw>mingw32-make -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=1 UNICODE=1 CXXFLAGS=-fno-keep-inline-dllexport
if not exist gcc_mswudll mkdir gcc_mswudll
if not exist ..\..\lib\gcc_dll mkdir ..\..\lib\gcc_dll
if not exist ..\..\lib\gcc_dll\mswu mkdir ..\..\lib\gcc_dll\mswu
if not exist ..\..\lib\gcc_dll\mswu\wx mkdir ..\..\lib\gcc_dll\mswu\wx
if not exist ..\..\lib\gcc_dll\mswu\wx\setup.h copy ..\..\include\wx\msw\setup.h ..\..\lib\gcc_dll\mswu\wx\setup.h
if not exist ..\..\lib\gcc_dll\mswu\wx\msw mkdir ..\..\lib\gcc_dll\mswu\wx\msw
gcc -E "..\..\include\wx\msw\genrcdefs.h" > "..\..\lib\gcc_dll\mswu\wx\msw\rcdefs.h"
gcc -c -o gcc_mswudll\wxregex_regcomp.o  -O2 -mthreads  -DHAVE_W32API_H -DNDEBUG -I..\..\include -I..\..\lib\gcc_dll\mswu -D__WXMSW__  -D_UNICODE   -MTgcc_mswudll\wxregex_regcomp.o -MFgcc_mswudll\wxregex_regcomp.o.d -MD -MP ../../src/regex/regcomp.c
In file included from ..\..\include/wx/defs.h:27:0,
                 from ../../src/regex/regcustom.h:39,
                 from ../../src/regex/regguts.h:38,
                 from ../../src/regex/regcomp.c:33:
..\..\include/wx/platform.h:183:22: fatal error: wx/setup.h: No such file or directory
compilation terminated.
makefile.gcc:5702: recipe for target 'gcc_mswudll\wxregex_regcomp.o' failed
mingw32-make: *** [gcc_mswudll\wxregex_regcomp.o] Error 1

C:\wxWidgets-3.0.4\build\msw>

Any clues as to what is causing the error? Thanks.


PS: I'm using this guide

http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef
« Last Edit: May 05, 2019, 04:34:09 pm by djsb »

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 2379
Re: WxWidgets and Code:blocks beginner-Do I build 64 or 32 bit?
« Reply #4 on: May 05, 2019, 04:48:52 pm »
I think this is an error in the makefile.

Try to rerun the make command with the same parameters. Make a make clean before you do it...

Offline djsb

  • Single posting newcomer
  • *
  • Posts: 8
Re: WxWidgets and Code:blocks beginner-Do I build 64 or 32 bit?
« Reply #5 on: May 05, 2019, 05:48:23 pm »
Here is my latest effort and results.

Code: [Select]
Microsoft Windows [Version 10.0.17763.437]
(c) 2018 Microsoft Corporation. All rights reserved.

C:\WINDOWS\system32>cd C:\wxWidgets-3.0.4\build\msw

C:\wxWidgets-3.0.4\build\msw>mingw32-make -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=1 UNICODE=1 CXXFLAGS=-fno-keep-inline-dllexport clean
if exist gcc_mswudll\*.o del gcc_mswudll\*.o
if exist gcc_mswudll\*.d del gcc_mswudll\*.d
if exist ..\..\lib\gcc_dll\libwxregexu.a del ..\..\lib\gcc_dll\libwxregexu.a
if exist ..\..\lib\gcc_dll\libwxzlib.a del ..\..\lib\gcc_dll\libwxzlib.a
if exist ..\..\lib\gcc_dll\libwxpng.a del ..\..\lib\gcc_dll\libwxpng.a
if exist ..\..\lib\gcc_dll\libwxjpeg.a del ..\..\lib\gcc_dll\libwxjpeg.a
if exist ..\..\lib\gcc_dll\libwxtiff.a del ..\..\lib\gcc_dll\libwxtiff.a
if exist ..\..\lib\gcc_dll\libwxexpat.a del ..\..\lib\gcc_dll\libwxexpat.a
if exist ..\..\lib\gcc_dll\libwxscintilla.a del ..\..\lib\gcc_dll\libwxscintilla.a
if exist ..\..\lib\gcc_dll\wxmsw30u_gcc_custom.dll del ..\..\lib\gcc_dll\wxmsw30u_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxmsw30u.a del ..\..\lib\gcc_dll\libwxmsw30u.a
if exist ..\..\lib\gcc_dll\libwxmsw30u.a del ..\..\lib\gcc_dll\libwxmsw30u.a
if exist ..\..\lib\gcc_dll\wxbase30u_gcc_custom.dll del ..\..\lib\gcc_dll\wxbase30u_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxbase30u.a del ..\..\lib\gcc_dll\libwxbase30u.a
if exist ..\..\lib\gcc_dll\libwxbase30u.a del ..\..\lib\gcc_dll\libwxbase30u.a
if exist ..\..\lib\gcc_dll\wxbase30u_net_gcc_custom.dll del ..\..\lib\gcc_dll\wxbase30u_net_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxbase30u_net.a del ..\..\lib\gcc_dll\libwxbase30u_net.a
if exist ..\..\lib\gcc_dll\libwxbase30u_net.a del ..\..\lib\gcc_dll\libwxbase30u_net.a
if exist ..\..\lib\gcc_dll\wxmsw30u_core_gcc_custom.dll del ..\..\lib\gcc_dll\wxmsw30u_core_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxmsw30u_core.a del ..\..\lib\gcc_dll\libwxmsw30u_core.a
if exist ..\..\lib\gcc_dll\libwxmsw30u_core.a del ..\..\lib\gcc_dll\libwxmsw30u_core.a
if exist ..\..\lib\gcc_dll\wxmsw30u_adv_gcc_custom.dll del ..\..\lib\gcc_dll\wxmsw30u_adv_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxmsw30u_adv.a del ..\..\lib\gcc_dll\libwxmsw30u_adv.a
if exist ..\..\lib\gcc_dll\libwxmsw30u_adv.a del ..\..\lib\gcc_dll\libwxmsw30u_adv.a
if exist ..\..\lib\gcc_dll\wxmsw30u_media_gcc_custom.dll del ..\..\lib\gcc_dll\wxmsw30u_media_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxmsw30u_media.a del ..\..\lib\gcc_dll\libwxmsw30u_media.a
if exist ..\..\lib\gcc_dll\libwxmsw30u_media.a del ..\..\lib\gcc_dll\libwxmsw30u_media.a
if exist ..\..\lib\gcc_dll\wxmsw30u_html_gcc_custom.dll del ..\..\lib\gcc_dll\wxmsw30u_html_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxmsw30u_html.a del ..\..\lib\gcc_dll\libwxmsw30u_html.a
if exist ..\..\lib\gcc_dll\libwxmsw30u_html.a del ..\..\lib\gcc_dll\libwxmsw30u_html.a
if exist ..\..\lib\gcc_dll\wxmsw30u_webview_gcc_custom.dll del ..\..\lib\gcc_dll\wxmsw30u_webview_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxmsw30u_webview.a del ..\..\lib\gcc_dll\libwxmsw30u_webview.a
if exist ..\..\lib\gcc_dll\libwxmsw30u_webview.a del ..\..\lib\gcc_dll\libwxmsw30u_webview.a
if exist ..\..\lib\gcc_dll\wxmsw30u_qa_gcc_custom.dll del ..\..\lib\gcc_dll\wxmsw30u_qa_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxmsw30u_qa.a del ..\..\lib\gcc_dll\libwxmsw30u_qa.a
if exist ..\..\lib\gcc_dll\libwxmsw30u_qa.a del ..\..\lib\gcc_dll\libwxmsw30u_qa.a
if exist ..\..\lib\gcc_dll\wxbase30u_xml_gcc_custom.dll del ..\..\lib\gcc_dll\wxbase30u_xml_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxbase30u_xml.a del ..\..\lib\gcc_dll\libwxbase30u_xml.a
if exist ..\..\lib\gcc_dll\libwxbase30u_xml.a del ..\..\lib\gcc_dll\libwxbase30u_xml.a
if exist ..\..\lib\gcc_dll\wxmsw30u_xrc_gcc_custom.dll del ..\..\lib\gcc_dll\wxmsw30u_xrc_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxmsw30u_xrc.a del ..\..\lib\gcc_dll\libwxmsw30u_xrc.a
if exist ..\..\lib\gcc_dll\libwxmsw30u_xrc.a del ..\..\lib\gcc_dll\libwxmsw30u_xrc.a
if exist ..\..\lib\gcc_dll\wxmsw30u_aui_gcc_custom.dll del ..\..\lib\gcc_dll\wxmsw30u_aui_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxmsw30u_aui.a del ..\..\lib\gcc_dll\libwxmsw30u_aui.a
if exist ..\..\lib\gcc_dll\libwxmsw30u_aui.a del ..\..\lib\gcc_dll\libwxmsw30u_aui.a
if exist ..\..\lib\gcc_dll\wxmsw30u_ribbon_gcc_custom.dll del ..\..\lib\gcc_dll\wxmsw30u_ribbon_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxmsw30u_ribbon.a del ..\..\lib\gcc_dll\libwxmsw30u_ribbon.a
if exist ..\..\lib\gcc_dll\libwxmsw30u_ribbon.a del ..\..\lib\gcc_dll\libwxmsw30u_ribbon.a
if exist ..\..\lib\gcc_dll\wxmsw30u_propgrid_gcc_custom.dll del ..\..\lib\gcc_dll\wxmsw30u_propgrid_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxmsw30u_propgrid.a del ..\..\lib\gcc_dll\libwxmsw30u_propgrid.a
if exist ..\..\lib\gcc_dll\libwxmsw30u_propgrid.a del ..\..\lib\gcc_dll\libwxmsw30u_propgrid.a
if exist ..\..\lib\gcc_dll\wxmsw30u_richtext_gcc_custom.dll del ..\..\lib\gcc_dll\wxmsw30u_richtext_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxmsw30u_richtext.a del ..\..\lib\gcc_dll\libwxmsw30u_richtext.a
if exist ..\..\lib\gcc_dll\libwxmsw30u_richtext.a del ..\..\lib\gcc_dll\libwxmsw30u_richtext.a
if exist ..\..\lib\gcc_dll\wxmsw30u_stc_gcc_custom.dll del ..\..\lib\gcc_dll\wxmsw30u_stc_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxmsw30u_stc.a del ..\..\lib\gcc_dll\libwxmsw30u_stc.a
if exist ..\..\lib\gcc_dll\libwxmsw30u_stc.a del ..\..\lib\gcc_dll\libwxmsw30u_stc.a
if exist ..\..\lib\gcc_dll\wxmsw30u_gl_gcc_custom.dll del ..\..\lib\gcc_dll\wxmsw30u_gl_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxmsw30u_gl.a del ..\..\lib\gcc_dll\libwxmsw30u_gl.a
if exist ..\..\lib\gcc_dll\libwxmsw30u_gl.a del ..\..\lib\gcc_dll\libwxmsw30u_gl.a
mingw32-make -C ..\..\samples -f makefile.gcc LINK_DLL_FLAGS="-shared" LINK_MODULE_FLAGS="-shared" CC="gcc" CXX="g++" CFLAGS="" CXXFLAGS="-fno-keep-inline-dllexport" CPPFLAGS="" LDFLAGS="" CPP="gcc -E" SHARED="1" TOOLKIT_VERSION="" WXUNIV="0" UNICODE="1" MSLU="0" BUILD="release" DEBUG_INFO="default" DEBUG_FLAG="1" MONOLITHIC="1" USE_GUI="1" USE_HTML="1" USE_WEBVIEW="1" USE_MEDIA="1" USE_XRC="1" USE_AUI="1" USE_RIBBON="1" USE_PROPGRID="1" USE_RICHTEXT="1" USE_STC="1" USE_OPENGL="1" USE_QA="0" USE_EXCEPTIONS="1" USE_RTTI="1" USE_THREADS="1" USE_CAIRO="0" OFFICIAL_BUILD="0" VENDOR="custom" WX_FLAVOUR="" WX_LIB_FLAVOUR="" CFG="" CPPUNIT_CFLAGS="" CPPUNIT_LIBS="" RUNTIME_LIBS="dynamic" GCC_VERSION="3" WINDRES="windres --use-temp-file" clean
makefile.gcc:5096: recipe for target 'clean' failed
mingw32-make: *** [clean] Error 1

C:\wxWidgets-3.0.4\build\msw>mingw32-make -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=1 UNICODE=1 CXXFLAGS=-fno-keep-inline-dllexport
if not exist gcc_mswudll mkdir gcc_mswudll
if not exist ..\..\lib\gcc_dll mkdir ..\..\lib\gcc_dll
if not exist ..\..\lib\gcc_dll\mswu mkdir ..\..\lib\gcc_dll\mswu
if not exist ..\..\lib\gcc_dll\mswu\wx mkdir ..\..\lib\gcc_dll\mswu\wx
if not exist ..\..\lib\gcc_dll\mswu\wx\setup.h copy ..\..\include\wx\msw\setup.h ..\..\lib\gcc_dll\mswu\wx\setup.h
if not exist ..\..\lib\gcc_dll\mswu\wx\msw mkdir ..\..\lib\gcc_dll\mswu\wx\msw
gcc -E "..\..\include\wx\msw\genrcdefs.h" > "..\..\lib\gcc_dll\mswu\wx\msw\rcdefs.h"
gcc -c -o gcc_mswudll\wxregex_regcomp.o  -O2 -mthreads  -DHAVE_W32API_H -DNDEBUG -I..\..\include -I..\..\lib\gcc_dll\mswu -D__WXMSW__  -D_UNICODE   -MTgcc_mswudll\wxregex_regcomp.o -MFgcc_mswudll\wxregex_regcomp.o.d -MD -MP ../../src/regex/regcomp.c
In file included from ..\..\include/wx/defs.h:27:0,
                 from ../../src/regex/regcustom.h:39,
                 from ../../src/regex/regguts.h:38,
                 from ../../src/regex/regcomp.c:33:
..\..\include/wx/platform.h:183:22: fatal error: wx/setup.h: No such file or directory
compilation terminated.
makefile.gcc:5702: recipe for target 'gcc_mswudll\wxregex_regcomp.o' failed
mingw32-make: *** [gcc_mswudll\wxregex_regcomp.o] Error 1

C:\wxWidgets-3.0.4\build\msw>mingw32-make -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=1 UNICODE=1 CXXFLAGS=-fno-keep-inline-dllexport clean
if exist gcc_mswudll\*.o del gcc_mswudll\*.o
if exist gcc_mswudll\*.d del gcc_mswudll\*.d
if exist ..\..\lib\gcc_dll\libwxregexu.a del ..\..\lib\gcc_dll\libwxregexu.a
if exist ..\..\lib\gcc_dll\libwxzlib.a del ..\..\lib\gcc_dll\libwxzlib.a
if exist ..\..\lib\gcc_dll\libwxpng.a del ..\..\lib\gcc_dll\libwxpng.a
if exist ..\..\lib\gcc_dll\libwxjpeg.a del ..\..\lib\gcc_dll\libwxjpeg.a
if exist ..\..\lib\gcc_dll\libwxtiff.a del ..\..\lib\gcc_dll\libwxtiff.a
if exist ..\..\lib\gcc_dll\libwxexpat.a del ..\..\lib\gcc_dll\libwxexpat.a
if exist ..\..\lib\gcc_dll\libwxscintilla.a del ..\..\lib\gcc_dll\libwxscintilla.a
if exist ..\..\lib\gcc_dll\wxmsw30u_gcc_custom.dll del ..\..\lib\gcc_dll\wxmsw30u_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxmsw30u.a del ..\..\lib\gcc_dll\libwxmsw30u.a
if exist ..\..\lib\gcc_dll\libwxmsw30u.a del ..\..\lib\gcc_dll\libwxmsw30u.a
if exist ..\..\lib\gcc_dll\wxbase30u_gcc_custom.dll del ..\..\lib\gcc_dll\wxbase30u_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxbase30u.a del ..\..\lib\gcc_dll\libwxbase30u.a
if exist ..\..\lib\gcc_dll\libwxbase30u.a del ..\..\lib\gcc_dll\libwxbase30u.a
if exist ..\..\lib\gcc_dll\wxbase30u_net_gcc_custom.dll del ..\..\lib\gcc_dll\wxbase30u_net_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxbase30u_net.a del ..\..\lib\gcc_dll\libwxbase30u_net.a
if exist ..\..\lib\gcc_dll\libwxbase30u_net.a del ..\..\lib\gcc_dll\libwxbase30u_net.a
if exist ..\..\lib\gcc_dll\wxmsw30u_core_gcc_custom.dll del ..\..\lib\gcc_dll\wxmsw30u_core_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxmsw30u_core.a del ..\..\lib\gcc_dll\libwxmsw30u_core.a
if exist ..\..\lib\gcc_dll\libwxmsw30u_core.a del ..\..\lib\gcc_dll\libwxmsw30u_core.a
if exist ..\..\lib\gcc_dll\wxmsw30u_adv_gcc_custom.dll del ..\..\lib\gcc_dll\wxmsw30u_adv_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxmsw30u_adv.a del ..\..\lib\gcc_dll\libwxmsw30u_adv.a
if exist ..\..\lib\gcc_dll\libwxmsw30u_adv.a del ..\..\lib\gcc_dll\libwxmsw30u_adv.a
if exist ..\..\lib\gcc_dll\wxmsw30u_media_gcc_custom.dll del ..\..\lib\gcc_dll\wxmsw30u_media_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxmsw30u_media.a del ..\..\lib\gcc_dll\libwxmsw30u_media.a
if exist ..\..\lib\gcc_dll\libwxmsw30u_media.a del ..\..\lib\gcc_dll\libwxmsw30u_media.a
if exist ..\..\lib\gcc_dll\wxmsw30u_html_gcc_custom.dll del ..\..\lib\gcc_dll\wxmsw30u_html_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxmsw30u_html.a del ..\..\lib\gcc_dll\libwxmsw30u_html.a
if exist ..\..\lib\gcc_dll\libwxmsw30u_html.a del ..\..\lib\gcc_dll\libwxmsw30u_html.a
if exist ..\..\lib\gcc_dll\wxmsw30u_webview_gcc_custom.dll del ..\..\lib\gcc_dll\wxmsw30u_webview_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxmsw30u_webview.a del ..\..\lib\gcc_dll\libwxmsw30u_webview.a
if exist ..\..\lib\gcc_dll\libwxmsw30u_webview.a del ..\..\lib\gcc_dll\libwxmsw30u_webview.a
if exist ..\..\lib\gcc_dll\wxmsw30u_qa_gcc_custom.dll del ..\..\lib\gcc_dll\wxmsw30u_qa_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxmsw30u_qa.a del ..\..\lib\gcc_dll\libwxmsw30u_qa.a
if exist ..\..\lib\gcc_dll\libwxmsw30u_qa.a del ..\..\lib\gcc_dll\libwxmsw30u_qa.a
if exist ..\..\lib\gcc_dll\wxbase30u_xml_gcc_custom.dll del ..\..\lib\gcc_dll\wxbase30u_xml_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxbase30u_xml.a del ..\..\lib\gcc_dll\libwxbase30u_xml.a
if exist ..\..\lib\gcc_dll\libwxbase30u_xml.a del ..\..\lib\gcc_dll\libwxbase30u_xml.a
if exist ..\..\lib\gcc_dll\wxmsw30u_xrc_gcc_custom.dll del ..\..\lib\gcc_dll\wxmsw30u_xrc_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxmsw30u_xrc.a del ..\..\lib\gcc_dll\libwxmsw30u_xrc.a
if exist ..\..\lib\gcc_dll\libwxmsw30u_xrc.a del ..\..\lib\gcc_dll\libwxmsw30u_xrc.a
if exist ..\..\lib\gcc_dll\wxmsw30u_aui_gcc_custom.dll del ..\..\lib\gcc_dll\wxmsw30u_aui_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxmsw30u_aui.a del ..\..\lib\gcc_dll\libwxmsw30u_aui.a
if exist ..\..\lib\gcc_dll\libwxmsw30u_aui.a del ..\..\lib\gcc_dll\libwxmsw30u_aui.a
if exist ..\..\lib\gcc_dll\wxmsw30u_ribbon_gcc_custom.dll del ..\..\lib\gcc_dll\wxmsw30u_ribbon_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxmsw30u_ribbon.a del ..\..\lib\gcc_dll\libwxmsw30u_ribbon.a
if exist ..\..\lib\gcc_dll\libwxmsw30u_ribbon.a del ..\..\lib\gcc_dll\libwxmsw30u_ribbon.a
if exist ..\..\lib\gcc_dll\wxmsw30u_propgrid_gcc_custom.dll del ..\..\lib\gcc_dll\wxmsw30u_propgrid_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxmsw30u_propgrid.a del ..\..\lib\gcc_dll\libwxmsw30u_propgrid.a
if exist ..\..\lib\gcc_dll\libwxmsw30u_propgrid.a del ..\..\lib\gcc_dll\libwxmsw30u_propgrid.a
if exist ..\..\lib\gcc_dll\wxmsw30u_richtext_gcc_custom.dll del ..\..\lib\gcc_dll\wxmsw30u_richtext_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxmsw30u_richtext.a del ..\..\lib\gcc_dll\libwxmsw30u_richtext.a
if exist ..\..\lib\gcc_dll\libwxmsw30u_richtext.a del ..\..\lib\gcc_dll\libwxmsw30u_richtext.a
if exist ..\..\lib\gcc_dll\wxmsw30u_stc_gcc_custom.dll del ..\..\lib\gcc_dll\wxmsw30u_stc_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxmsw30u_stc.a del ..\..\lib\gcc_dll\libwxmsw30u_stc.a
if exist ..\..\lib\gcc_dll\libwxmsw30u_stc.a del ..\..\lib\gcc_dll\libwxmsw30u_stc.a
if exist ..\..\lib\gcc_dll\wxmsw30u_gl_gcc_custom.dll del ..\..\lib\gcc_dll\wxmsw30u_gl_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxmsw30u_gl.a del ..\..\lib\gcc_dll\libwxmsw30u_gl.a
if exist ..\..\lib\gcc_dll\libwxmsw30u_gl.a del ..\..\lib\gcc_dll\libwxmsw30u_gl.a
mingw32-make -C ..\..\samples -f makefile.gcc LINK_DLL_FLAGS="-shared" LINK_MODULE_FLAGS="-shared" CC="gcc" CXX="g++" CFLAGS="" CXXFLAGS="-fno-keep-inline-dllexport" CPPFLAGS="" LDFLAGS="" CPP="gcc -E" SHARED="1" TOOLKIT_VERSION="" WXUNIV="0" UNICODE="1" MSLU="0" BUILD="release" DEBUG_INFO="default" DEBUG_FLAG="1" MONOLITHIC="1" USE_GUI="1" USE_HTML="1" USE_WEBVIEW="1" USE_MEDIA="1" USE_XRC="1" USE_AUI="1" USE_RIBBON="1" USE_PROPGRID="1" USE_RICHTEXT="1" USE_STC="1" USE_OPENGL="1" USE_QA="0" USE_EXCEPTIONS="1" USE_RTTI="1" USE_THREADS="1" USE_CAIRO="0" OFFICIAL_BUILD="0" VENDOR="custom" WX_FLAVOUR="" WX_LIB_FLAVOUR="" CFG="" CPPUNIT_CFLAGS="" CPPUNIT_LIBS="" RUNTIME_LIBS="dynamic" GCC_VERSION="3" WINDRES="windres --use-temp-file" clean
makefile.gcc:5096: recipe for target 'clean' failed
mingw32-make: *** [clean] Error 1

C:\wxWidgets-3.0.4\build\msw>

Offline Miguel Gimenez

  • Regular
  • ***
  • Posts: 301
Re: WxWidgets and Code:blocks beginner-Do I build 64 or 32 bit?
« Reply #6 on: May 05, 2019, 06:07:44 pm »
Did you copy include\wx\msw\setup0.h to include\wx\msw\setup.h?

Offline djsb

  • Single posting newcomer
  • *
  • Posts: 8
Re: WxWidgets and Code:blocks beginner-Do I build 64 or 32 bit?
« Reply #7 on: May 05, 2019, 06:16:37 pm »
There is no setup0.h in C:\wxWidgets-3.0.4\include\wx\msw
There is a setup.h in the same directory.
Thanks.

Offline Miguel Gimenez

  • Regular
  • ***
  • Posts: 301
Re: WxWidgets and Code:blocks beginner-Do I build 64 or 32 bit?
« Reply #8 on: May 05, 2019, 06:28:58 pm »
Copy that file instead of setup0.h

Offline djsb

  • Single posting newcomer
  • *
  • Posts: 8
Re: WxWidgets and Code:blocks beginner-Do I build 64 or 32 bit?
« Reply #9 on: May 05, 2019, 06:57:49 pm »
Copy that file instead of setup0.h
Where am I meant to copy the setup.h file to? I'm confused. Surely header files are meant to be in an include directory. The file C:\wxWidgets-3.0.4\include\wx\msw\setup.h is in an include directory. Where should I copy it to and why? Thanks.

Offline sodev

  • Regular
  • ***
  • Posts: 295
Re: WxWidgets and Code:blocks beginner-Do I build 64 or 32 bit?
« Reply #10 on: May 05, 2019, 07:07:41 pm »
There is no need to create the setup.h file from the setup0.h file if you are using a release archive, it is already done there, you only need to do that if you are using a git clone.

The problem is most probably that the Makefile fails to create the required output directories, this is a long outstanding bug in these generated Makefiles. Running make multiple times might create the directories but usually fails especially if using parallel builds.

You have to create the directories yourself, it is something like mswu\wx\msw and mswud\wx\msw in the lib and dll output directory.

Offline djsb

  • Single posting newcomer
  • *
  • Posts: 8
Re: WxWidgets and Code:blocks beginner-Do I build 64 or 32 bit?
« Reply #11 on: May 05, 2019, 07:23:33 pm »
So assuming i'm starting from C:\wxWidgets-3.0.4\build\msw which directories do I have to create? Is it C:\wxWidgets-3.0.4\build\msw\lib\mswu\wx\msw and  C:\wxWidgets-3.0.4\build\msw\dll\mswud\wx\msw?
What are these directories for? Thanks.


PS: I wonder if the steps mentioned in this post will solve my problem?

https://forums.wxwidgets.org/viewtopic.php?t=43289
« Last Edit: May 05, 2019, 08:11:29 pm by djsb »

Offline djsb

  • Single posting newcomer
  • *
  • Posts: 8
Re: WxWidgets and Code:blocks beginner-Do I build 64 or 32 bit?
« Reply #12 on: May 06, 2019, 07:29:43 am »
So finally got something to happen. This is what I did

a/ mkdir C:\wxWidgets-3.0.4\lib\gcc_dll\mswu\wx
b/copy C:\wxWidgets-3.0.4\include\wx\msw\setup.h C:\wxWidgets-3.0.4\lib\gcc_dll\mswu\wx\setup.h
c/Rename C:\Program Files (x86)\CodeBlocks\MinGW\mingw32 to C:\Program Files (x86)\CodeBlocks\MinGW\mingw32_old (prevents as.exe error dialog pop-up).

//In my case it was an issue with it trying to execute as.exe from MinGW/mingw32/bin instead of MinGW/bin (the libintl DLL doesn't exist in the former location). I renamed the MinGW/mingw32 folder to prevent it being found and the compilation succeeded.

d/cd C:\wxWidgets-3.0.4\build\msw

e/mingw32-make SHELL=CMD.exe -f makefile.gcc BUILD=release UNICODE=1 SHARED=1 MONOLITHIC=1 CXXFLAGS="-fno-keep-inline-dllexport -std=gnu++11" setup_h

f/mingw32-make SHELL=CMD.exe -f makefile.gcc BUILD=release UNICODE=1 SHARED=1 MONOLITHIC=1 CXXFLAGS="-fno-keep-inline-dllexport -std=gnu++11"

This resulted in a screen full of gcc commands then some if exist command lines that appear to delete files from the gcc_dll directory. Then the g++ commands.

The C:\wxWidgets-3.0.4\lib\gcc_dll\mswu\wx directory is empty apart from the setup.h file that was copied earlier. This directory was listed in the commands that fill the screen.
The only result I can see from all this is a load of c++ files in newly created directories. All the directories have yesterdays date but the files are dated at an earlier date.
Hoping to test out this library later today.

PS: Just tried to compile a minimal example. Code blocks cant find a DLL file. Turns out my comodo antivirus has put ALL the compiled DLL files into a hidden containment folder on my hard drive. Trying again now this turned off.
PPS: Got the minimal example to compile but with 180 odd wxDEPRECATE warnings. I also had to put the wxmsw30u_gcc_custom.dll file into the project directory. Is there an easy way to get rid of the DEPRECATE messages?
« Last Edit: May 06, 2019, 12:02:37 pm by djsb »

Offline sodev

  • Regular
  • ***
  • Posts: 295
Re: WxWidgets and Code:blocks beginner-Do I build 64 or 32 bit?
« Reply #13 on: May 06, 2019, 08:36:45 pm »
There is no need to copy anything into the output directories, you just have to create them. There is also no need to run any other Makefile target than the default one.

Apparently your system paths are screwed, you seem to have multiple MinGW installations present, this can cause even more trouble. Usually its best to have no MinGW installation on the system path but setup a shell with the proper setup script when you need. For building wxWidgets i use slightly modified scripts from https://github.com/rjpcomputing/wxpack, you just have to remove the version tags from the output directories if you want to build CodeBlocks itself, it doesnt work with the tagged directories.

About your deprecation warnings, my crystal ball can't read your console output so i don't know :P