User forums > Help

Code::Blocks not recognizing compiler

<< < (4/6) > >>

darthdespotism:
can you post the output when you enable -v

don't forget to set the C++-Compiler back to mingw32-g++.exe

jon14:

--- Quote from: darthdespotism on June 21, 2007, 07:54:33 pm ---can you post the output when you enable -v

don't forget to set the C++-Compiler back to mingw32-g++.exe

--- End quote ---

I can't seem to find the -v. Is it in the compiler settings tab? All I see is -w, -s, and a ton of others, but no -v.
I also just set the compiler back to gcc, still a no go.

TDragon:
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

jon14:

--- Quote from: TDragon on June 22, 2007, 03:20:59 pm ---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

--- End quote ---

Thank you for the reply.

I've recently downloaded a different compiler(Digital Mars) and did the same thing with the option settings as I did with my GCC. After I tried compiling the code, I got a different error. Instead of "invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]" I now get "unable to open input file 'iostream'.

[Edit] Actually, now that I've looked at this some more, the GCC compiler is still a problem. I forgot that a when setting a new compiler, you have to create a new project in order to use it. But the Mars compiler works fine now...except for the 'iostream' error.

darthdespotism:
For g++ - Compiler.
Go to Compiler Settings -> Other Options. There might be a -fexceptions. add here the -v

I can look for mine when someone can tell me where Codeblocks saves the Configuration.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version