First to the OP. Choose 'run' from the start menu and enter "SystemPropertiesAdvanced.exe" and edit your environment variables. At the beginning of your PATH variable add:
%GCC_ROOT_PATH%\bin;%GCC_ROOT_PATH%\libexec\gcc\mingw32\3.4.5;
And then make sure you create a new variable named GCC_ROOT_PATH and set it to your mingw root directory. Likely to be one of:
c:\mingw
OR
c:\program files\codeblocks\mingw
This will make sure that the gcc helper executables (cc1.exe,cc1plus.exe,collect.exe) are available to the system.
That out of the way:
* Are you running Windows Vista?
* If so, are you using a version of MinGW/GCC without the Vista fix? (The version bundled with C::B 8.02 includes the Vista fix.)
* If not, did you install MinGW yourself and forget the g++ package?
I am also attempting to get C::B/mingw working on a Vista system. I manually installed mingw using all the patch2 files from mingw.org. Specifically I downloaded each of:
gcc-core-3.4.5-20060117-2.tar.gz
gcc-g++-3.4.5-20060117-2.tar.gz
binutils-2.18.50-20080109-2.tar.gz
mingw32-make-3.81-20080326.tar.gz
mingw-runtime-3.14.tar.gz
mingw-utils-0.3.tar.gz
w32api-3.11.tar.gz
and unzipped them to c:\dev\mingw. I am under the assumption (after reading the update log you posted at the mingw.org site) that all packages listed contain the latest vista fixes. At this point the compiler works fine but I fail at linking with:
Compiling: main.cpp
Linking console executable: bin\Release\blah.exe
ld: crt2.o: No such file: No such file or directory
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
code
#include <iostream>
using namespace std;
int main()
{
cout << "Hello world!" << endl;
return 0;
}
To my knowledge that file should be visible to the environment.
Compiler Search Directories:
C:\dev\MinGW\include
C:\dev\MinGW\include\c++\3.4.5
C:\dev\MinGW\include\c++\3.4.5\backward
C:\dev\MinGW\include\c++\3.4.5\mingw32
C:\dev\MinGW\lib\gcc\mingw32\3.4.5\include
Linker Search Directories:
C:\dev\MinGW\lib
C:\dev\MinGW\lib\gcc\mingw32\3.4.5
the file in question is located at C:\dev\MinGW\lib\crt2.o which is inside the first entry in my linker search dirs. I am a bit confused about what could be causing the problem and after reading thru the few entries i could locate on the forums (searching for crt2.0) and even googling (which had some links to DevC++ people with same problem) the only advice I found included adding paths that i've already got set.
When originally (quite awhile back) setting this up to work on my WinXP system I remember adding %GCC_ROOT_PATH%\mingw32\bin to my path in addition to just /bin, but looking at the directory layout on vista all files in mingw32/bin are already located in /bin so I dont see that as possibly helping.
Any suggestions? Any additional faqs/resources i should browse? I've already read
http://wiki.codeblocks.org/index.php?title=Installing_MinGW_with_Vista and even updated it (it forgot one entry for compiler includes) and Im now officially out of options.
Seronis
edit:
On a side note, on a friends vista system shortly after the 8.02 release I did get C::B installed using the prepackaged mingw and the only setup i remember doing there to get it to work was the environment variables and search directories. Any chance that last nights vista automatic updates broke vistas compatibility with mingw?