Step 1 to trouble shoot compiler problem; turn on full logging
http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F
Note: A beginner mistake is NOT to install all of MinGW GCC files.
Please try my batch file to check that most of MinGW Exists and which one it is
Edit: Just place the batch file in the MinGW Folder normally c:\MinGW and on XP it should not need edited.
My file version-of-gcc.bat
@echo off
REM credit to Peter Ward work in ReactOS Build Environment RosBE.cmd it gave me a starting point that I edited.
::
:: Display the current version of GCC, ld, make and others.
::
REM %CD% works in Windows XP, not sure when it was added to Windows
REM set GCCBASEDIR=C:\MinGW
set GCCBASEDIR=%CD%
ECHO GCCBASEDIR=%GCCBASEDIR%
SET PATH=%GCCBASEDIR%\bin;%SystemRoot%\system32
REM ECHO %PATH%
REM ECHO %GCCBASEDIR%\bin\pic30-gcc.exe
ECHO "Looking For g++"
if exist "%GCCBASEDIR%\bin\g++.exe" (g++.exe -v 2>&1 | find "version")
ECHO "Looking For gcc"
if exist "%GCCBASEDIR%\bin\gcc.exe" (gcc.exe -v 2>&1 | find "gcc version")
if exist "%GCCBASEDIR%\bin\ld.exe" (ld.exe -v)
REM 2>&1 | find "gcc version")
if exist "%GCCBASEDIR%\bin\pic30-gcc.exe" (pic30-gcc.exe -v 2>&1 | find "gcc version")
if exist "%GCCBASEDIR%\bin\pic32-gcc.exe" (pic32-gcc.exe -v 2>&1 | find "gcc version")
if exist "%GCCBASEDIR%\bin\msp430-gcc.exe" (msp430-gcc.exe -v 2>&1 | find "gcc version")
if exist "%GCCBASEDIR%\bin\arm-elf-gcc.exe" (arm-elf-gcc.exe -v 2>&1 | find "gcc version")
REM if exist %GCCBASEDIR%\bin\pic32-gcc.exe pic32-gcc.exe -print-search-dirs
if exist %GCCBASEDIR%\bin\pic32-ld.exe (pic32-ld.exe -melf32pic32mx -v)
if exist %GCCBASEDIR%\bin\windres.exe (windres --version | find "GNU windres")
if exist %GCCBASEDIR%\bin\dlltool.exe (dlltool --version | find "GNU dlltool")
if exist %GCCBASEDIR%\bin\pexports.exe (pexports | find "PExports" )
if exist %GCCBASEDIR%\bin\mingw32-make.exe (mingw32-make -v | find "GNU Make")
if exist %GCCBASEDIR%\bin\make.exe (ECHO It is not recommended to have make.exe in mingw/bin)
REM ECHO "The minGW runtime version is the same as __MINGW32_VERSION"
if exist "%GCCBASEDIR%\include\_mingw.h" (type "%GCCBASEDIR%\include\_mingw.h" | find "__MINGW32_VERSION" | find "#define")
if exist "%GCCBASEDIR%\include\w32api.h" (type "%GCCBASEDIR%\include\w32api.h" | find "__W32API_VERSION")
:_end
PAUSE
The output I get
GCCBASEDIR=D:\GreenApps\MinGW
"Looking For g++"
gcc version 3.4.5 (mingw-vista special r3)
"Looking For gcc"
gcc version 3.4.5 (mingw-vista special r3)
GNU ld (GNU Binutils) 2.18.50.20080109
GNU windres (GNU Binutils) 2.18.50.20080109
GNU dlltool (GNU Binutils) 2.18.50.20080109
#define __MINGW32_VERSION 3.15.2
#define __W32API_VERSION 3.13
Press any key to continue . . .
Tim S.