i found that ,i can compile amd64 formatted windows bin file by TDM-GCC w64.
and compile i386 formatted windows execute file with "-m32" option after linker & compiler option.
but the compile log told me that it can't link resource (*.res format),it looks like the resource format is not matched.
and i googled,use windres,it can compile resource file into amd64 & i386 format bin file with option "-F pe-i386 or pe-amd64"
in TDM-GCC w64 ,the default option is "-F pe-amd64“, so if i wanna build x86 bin file,i must add option "-F pe-i386" into windres when it compile the rc file.
but i can not find the blank where i can modify the resource compile option in codeblocks,
plz help me
-------------- Build: Release in gui (compiler: GNU GCC Compiler)---------------
x86_64-w64-mingw32-g++.exe -Wall -O2 -std=c++11 -m32 -c F:\WORK\GCC\gui\main.cpp -o obj\Release\main.o
F:\WORK\GCC\gui\main.cpp:36:35: warning: 'naked' attribute directive ignored [-Wattributes]
void __attribute__((naked)) test1()
^
windres.exe -J rc -O coff -i F:\WORK\GCC\gui\resource.rc -o obj\Release\resource.res
x86_64-w64-mingw32-g++.exe -o bin\Release\gui.exe obj\Release\main.o obj\Release\resource.res -s -m32 -lgdi32 -luser32 -lkernel32 -lcomctl32 -mwindows
D:/Program/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/bin/ld.exe: i386:x86-64 architecture of input file `obj\Release\resource.res' is incompatible with i386 output
collect2.exe: error: ld returned 1 exit status
the true command is
windres.exe -J rc -O coff -F pe-i386 -i F:\WORK\GCC\gui\resource.rc -o obj\Release\resource.res