[...]Are you sure you don't have a conflicting compiler selected / in the path?
Yep, I am pretty sure - for two reasons: (1) the path in Settings > Compiler > Toolchain executables is set to 'C:\codeblocks\MinGW' in this example and (2)
C:\>where mingw32-gcc.exe
C:\codeblocks\MinGW\bin\mingw32-gcc.exe
C:\MinGW\bin\mingw32-gcc.exe
BTW: After setting the compiler settings path (i.e. (1) above) to 'C:\MinGW', compilation works like a charm, i.e. then CB appears to call 'C:\MinGW\bin\mingw32-gcc.exe'.
Please post the full build log of a re-build.
Here it is the build log up and until compilation abortion:
C:\...\c\TestPrintCompilation>mingw32-gcc.exe -Wall -g -Wshadow -Winit-self -Wredundant-decls -Wunreachable-code -Wmissing-declarations -Wmissing-include-dirs -pedantic -Wzero-as-null-pointer-constant -Wfatal-errors -Wextra -Wall -g -c C:\...\c\TestPrintCompilation\main.c -o obj\Debug\main.o
cc1.exe: warning: command line option '-Wzero-as-null-pointer-constant' is valid for C++/ObjC++ but not for C
where
- main.c contains the standard 'hello world' sample and
- compilation is aborted with a pop-up window showing the error message as mentioned before
- running the compilation command on the command line (with directory set to the folder where main.c is residing) reproduces the error log and the error message prompted in the pop-up window
I might be wrong, but I thought that specifying the compiler settings path makes PATH irrelevant, although the full paths of the exe's are not shown in the build log. Isn't this true?
Thanks in any event!