User forums > General (but related to Code::Blocks)

How to create wxWidgets program for Windows 32 bit using codeblocks-20.03mingw?

(1/3) > >>

tumanovalex:
I installed codeblocks-20.03mingw-setup on Windows 10 Home 64bit. I compiled wxWidgets with the commands:
mingw32-make -f makefile.gcc SHARED = 0 UNICODE = 1 BUILD = debug
mingw32-make -f makefile.gcc SHARED = 0 UNICODE = 1 BUILD = release
Then I released a version of the program with wxWidgets. With the m64 flag set, I was able to create different versions of the program (with the Static linking flag set and three static flags set. The program works fine in Windows 64 bit. When the m32 flag is set, errors occur (indicated only part of the errors):
--- Code: ----windres.exe -ID: \ wxWid \ include -ID: \ wxWid \ lib \ gcc_lib \ mswu -J rc -O coff -i D: \ MyProgramming \ wxTestNew \ resource.rc -o obj \ Release \ resource.res
g ++. exe -Wall -m32 -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DwxUSE_UNICODE -O2 -m32 -ID: \ wxWid \ include -ID: \ wxWid \ lib \ gcc_lib \ mswu -ID: \ wxWid \ lib \ gcc_ -ID: \ wxWid \ include -c D: \ MyProgramming \ wxTestNew \ wxTestNewApp.cpp -o obj \ Release \ wxTestNewApp.o
g ++. exe -Wall -m32 -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DwxUSE_UNICODE -O2 -m32 -ID: \ wxWid \ include -ID: \ wxWid \ lib \ gcc_lib \ mswu -ID: \ wxWid \ lib \ gcc_ -ID: \ wxWid \ include -c D: \ MyProgramming \ wxTestNew \ wxTestNewMain.cpp -o obj \ Release \ wxTestNewMain.o
g ++. exe -LD: \ wxWid \ lib \ gcc_lib -o bin \ Release \ wxTestNew.exe obj \ Release \ wxTestNewApp.o obj \ Release \ wxTestNewMain.o obj \ Release \ resource.res -s -m32 -m32 -mthreads -lwxmsw31u_core -lwxbase31u -lwxpng -lwxzlib -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32llol -lllxlllclllclllcdlll -mwindows
D: / Program Files / CodeBlocks / MinGW / bin /../ lib / gcc / x86_64-w64-mingw32 / 8.1.0 /../../../../ x86_64-w64-mingw32 / bin / ld .exe: skipping incompatible D: \ wxWid \ lib \ gcc_lib / libwxmsw31u_core.a when searching for -lwxmsw31u_core
D: / Program Files / CodeBlocks / MinGW / bin /../ lib / gcc / x86_64-w64-mingw32 / 8.1.0 /../../../../ x86_64-w64-mingw32 / bin / ld .exe: skipping incompatible D: \ wxWid \ lib \ gcc_lib \ libwxmsw31u_core.a when searching for -lwxmsw31u_core
D: / Program Files / CodeBlocks / MinGW / bin /../ lib / gcc / x86_64-w64-mingw32 / 8.1.0 /../../../../ x86_64-w64-mingw32 / bin / ld .exe: skipping incompatible D: \ wxWid \ lib \ gcc_lib / libwxmsw31u_core.a when searching for -lwxmsw31u_core
D: / Program Files / CodeBlocks / MinGW / bin /../ lib / gcc / x86_64-w64-mingw32 / 8.1.0 /../../../../ x86_64-w64-mingw32 / bin / ld .exe: cannot find -lwxmsw31u_core
--- End code ---
What needs to be done so that on a PC with Windows 64 bit and codeblocks-20.03mingw it is possible to create programs with wxWidgets for a PC with Windows 32 bits and Windows 64 bit?

stahta01:
Where are you setting the m32 flag while building wxWidgets?

Edit: Where/When are the errors happening? Inside Code::Blocks IDE or while building wxWidgets?

Tim S.

stahta01:
You need to build 32 bit wxWidgets libraries in order to build an 32 bit wxWidgets application.

Tim S.

stahta01:
I see nothing that implies the 20.03 CB MinGW GCC fully supports 32 bit building.

It is not easy to do fully.

Tim S.

stahta01:
I will try it and see if it works for me; I consider it unlikely to work.

Tim S.

Navigation

[0] Message Index

[#] Next page

Go to full version