Works for me.
-------------- Build: Debug in TestWinGUI (compiler: GNU GCC Compiler)---------------
mingw32-g++.exe -Wall -g -c V:\SourceCode\CBProjects\TestProjects\TestWinGUI\main.cpp -o obj\Debug\main.o
windres.exe -J rc -O coff -i V:\SOURCE~1\CBPROJ~1\TESTPR~1\TESTWI~2\resource.rc -o obj\Debug\resource.res
mingw32-g++.exe -o bin\Debug\TestWinGUI.exe obj\Debug\main.o obj\Debug\resource.res -lgdi32 -luser32 -lkernel32 -lcomctl32
Output size is 32.63 KB
Your MinGW Compiler installation is likely missing "gcc.exe".
I am testing on Windows 7 32-bit and CB 12.11 using MinGW that came with CB 12.11.
What I get on Windows 7 if gcc.exe does NOT exist.
mingw32-g++.exe -Wall -g -c V:\SourceCode\CBProjects\TestProjects\TestWinGUI\main.cpp -o obj\Debug\main.o
windres.exe -J rc -O coff -i V:\SOURCE~1\CBPROJ~1\TESTPR~1\TESTWI~2\resource.rc -o obj\Debug\resource.res
'gcc' is not recognized as an internal or external command,
operable program or batch file.
windres.exe: preprocessing failed.
For anymore help from me; I need your CB Tool chain setting value for Compiler Installation Directory.
My guess is it is NOT using the correct MinGW GCC.
Tim S.
Compiler settings -> Global compiler settings -> Toolchain executables -> Compiler's installation directory = D:\CodeBlocks\MinGW
If "D:\CodeBlocks\MinGW" is NOT correct MinGW GCC then what is more correct?
Does the file D:\CodeBlocks\MinGW\bin\gcc.exe exist?
Edit: If it does exist what does the below in a cmd.exe window give
cd /d D:\CodeBlocks\MinGW\bin
gcc.exe -v
Tim S.
What does the below in a cmd.exe window give
cd /d D:\CodeBlocks\MinGW\bin
gcc.exe --version
Tim S.
Try this command and see if it works on the CMD.exe
gcc -E -xc -DRC_INVOKED D:\pjx\CB\Dialog\resource.rc
You will likely need to be in the "D:\CodeBlocks\MinGW\bin" folder or add it to your system path.
If it works or fails try this below commands
SET PATH=D:\CodeBlocks\MinGW\bin;%PATH%
cd /d D:\pjx\CB\Dialog
mingw32-g++.exe -Wall -g -c D:\pjx\CB\Dialog\main.cpp -o obj\Debug\main.o
windres.exe -J rc -O coff -i D:\pjx\CB\Dialog\resource.rc -o obj\Debug\resource.res
If the above works, it implies a problem in Code::Blocks.
If it fails, it implies a Compiler related issue. Compiler Installation or conflict issue being most likely.
Edit: If it fails, you should verify D:\pjx\CB\Dialog\resource.rc exists before thinking it is a compiler issue.
Tim S.