Are you running Windows Vista? If so, do a search in the forum for a couple of related threads.
On an unrelated topic, the version of C::B which includes the GCC compiler is not the newest version; the nightly builds (http://forums.codeblocks.org/index.php/board,20.0.html) are leaps and bounds ahead.
"hello - Release" uses an invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]. Skipping...
Nothing to be done.
Simple thing that needs checked. What compiler is the project using?
From memory, "Project" -> "Build Options" and verify it is using the correct compiler.
Tim S
What OS are you using? XP or Vista?
Have you verified that C:\MinGW contains an bin sub-folder?
Tim S
I worked it out a few weeks ago.
First search for your cc1plus.exe and add this Directory to your %PATH% - Environment - variable.
The try to compile the Hello World example with -v and try to reconstruct the Directorys told as "not found" at the beginning of the output. Add these via -I directly to the MinGW-Settings in Codeblocks.
Change you compiler installation directory to where you installed minGW.
Based on above "C:\C++\MinGW" is your installation directory.
Add "C:\C++\MinGW\libexec\gcc\mingw32\4.2.0" to "Additional Paths"
Tim S
Yep, got that in there too. Still not working.
I'm on 3 days now trying to figure this out, I really appreciate all the help and do apologize for being a little annoying.
Yep, got that in there too. Still not working.
I'm on 3 days now trying to figure this out, I really appreciate all the help and do apologize for being a little annoying.
But, has the error changed from "uses an invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]"?
Tim S
can you post the output when you enable -v
don't forget to set the C++-Compiler back to mingw32-g++.exe
All right, let's hunt this problem down.
Are you still on the "uses an invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]" error? If so, do the following:
- Open up your Global compiler settings, make sure you've selected "GNU GCC Compiler" at the top.
- Now switch to the "Toolchain executables" tab and take a look at the "C compiler" executable under "Program Files". C::B must verify that this program exists, or it will refuse to compile and give you that error message.
- The "C Compiler" should be set as "mingw32-gcc.exe". If it isn't, change it back.
- That program ("mingw32-gcc.exe") should exist along with the other 7 in the "bin" subdirectory of your main MinGW installation directory. If they don't, you need to reinstall the gcc-core, gcc-g++, binutils, and gdb packages. It would probably be a good idea, in this case, to just wipe your MinGW directory and do a complete reinstall.
- Finally, make sure that "Compiler's installation directory" (still on the "Toolchain executables" tab) points to your main MinGW installation directory -- the one containing the "bin" subdirectory with mingw32-gcc.exe and friends.
Once you've gotten the "uses an invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]" error fixed, leave the "Compiler's installation directory" option unchanged. Fixing the Vista-specific "cannot exec cc1plus" error may or may not require messing around with the "Additional Paths" area. I suspect the easiest fix for that is to add "<your MinGW installation directory>\libexec\gcc\mingw32\3.4.5" to Windows' PATH environment variable.
Hope that helps,
John E. / TDM
-------------- Build: Debug in musikRateTest ---------------
Compiling: main.cpp
Using built-in specs.
Configured with: ../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as --host=mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --enable-languages=c,c++,f77,ada,objc,java --disable-win32-registry --disable-shared --enable-sjlj-exceptions --enable-libgcj --disable-java-awt --without-x --enable-java-gc=boehm --disable-libgcj-debug --enable-interpreter --enable-hash-synchronization --enable-libstdcxx-debug
Thread model: win32
gcc version 3.4.2 (mingw-special)
cc1plus -quiet -v -IC:\MinGW\include -iprefix ../lib/gcc/mingw32/3.4.2/ d:\Projekte\CPP\musikRateTest\main.cpp -quiet -dumpbase main.cpp -auxbase-strip obj\Debug\main.o -g -Wall -version -fexceptions -o ./ccqiaaaa.s
ignoring nonexistent directory "../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2"
ignoring nonexistent directory "../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32"
ignoring nonexistent directory "../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/backward"
ignoring nonexistent directory "../lib/gcc/mingw32/3.4.2/../../../../include"
ignoring nonexistent directory "../lib/gcc/mingw32/3.4.2/include"
ignoring nonexistent directory "../lib/gcc/mingw32/3.4.2/../../../../mingw32/include"
ignoring nonexistent directory "/mingw/include/c++/3.4.2"
ignoring nonexistent directory "/mingw/include/c++/3.4.2/mingw32"
ignoring nonexistent directory "/mingw/include/c++/3.4.2/backward"
ignoring nonexistent directory "/mingw/include"
ignoring nonexistent directory "/mingw/include"
ignoring nonexistent directory "/mingw/lib/gcc/mingw32/3.4.2/include"
ignoring nonexistent directory "/mingw/mingw32/include"
ignoring nonexistent directory "/mingw/include"
#include "..." search starts here:
#include <...> search starts here:
C:/MinGW/include
End of search list.
GNU C++ version 3.4.2 (mingw-special) (mingw32)
compiled by GNU C version 3.4.2 (mingw-special).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
d:\Projekte\CPP\musikRateTest\main.cpp:1:20: iostream: No such file or directory
d:\Projekte\CPP\musikRateTest\main.cpp: In function `int main()':
d:\Projekte\CPP\musikRateTest\main.cpp:7: error: `cout' undeclared (first use this function)
d:\Projekte\CPP\musikRateTest\main.cpp:7: error: (Each undeclared identifier is reported only once for each function it appears in.)
d:\Projekte\CPP\musikRateTest\main.cpp:7: error: `endl' undeclared (first use this function)
Process terminated with status 1 (0 minutes, 0 seconds)
4 errors, 0 warnings
-I"C:/mingw/include/c++/3.4.2"
-I"C:/mingw/include/c++/3.4.2/mingw32"
-I"C:/mingw/include/c++/3.4.2/backward"
-I"C:/mingw/include"
-I"C:/mingw/lib/gcc/mingw32/3.4.2/include"
-I"C:/mingw/mingw32/include"
-------------- Build: Debug in musikRateTest ---------------
Linking console executable: bin\Debug\musikRateTest.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
I think you should file this as a bug, as in "having the project in a different partition as mingw doesn't work".
Would that be in Settings -> Compiler -> Linker -> Other linker settings?
Would that be in Settings -> Compiler -> Linker -> Other linker settings?
That's what I thought of.
Would have been nice if it worked, but as although sayed it's a known problem