News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

can't find compiler executable in your search path (GNU GCC compiler)

Started by pb910, January 04, 2013, 08:02:32 PM

Previous topic - Next topic

pb910

Hi,

I've been trying for 1 and a half hours to set code blocks up, I've tried various downloads, and i've searched on the internet for a while but could not understand the material.

I am getting the following error messages "can't find compiler executable in your search path(GNU GCC compiler)"

I downloaded the version of codeblocks that came bundled with minGW, so I thought that it would have came with a compiler?

I have very little knowledge about compilers, codeblocks, or operating systems.

I am using Windows 7. I downloaded the 3rd download on this page: http://www.codeblocks.org/downloads/26#windows .

Thank you.

laYahooz

I had a similar problem. Please note I'm a total n00b in C++ and IDE's but heres what I did (after some research)
So of course I downloaded the version that came with the compiler and it didn't work. Heres what I did:
1) go to settings in the upper part
2) click compiler
3) choose reset to defaults.

Hopefully this works  :-\



natedoggy

Unfortunately it did not work for me.
ANy other tips that might work. I've done what you have said installed and tried other compilers.
Please help

stahta01

C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

natedoggy

Thanks for the advice Tim S., but it still won't compile. It says that it is an environment error.

stahta01

Quote from: natedoggy on April 11, 2013, 10:59:57 PM
Thanks for the advice Tim S., but it still won't compile. It says that it is an environment error.

Please post the path you entered for the toolchain?
Did you verify the path was valid?

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]


SmittenJKitten

I had the same problem, and now i'm good to go.

Download this http://sourceforge.net/projects/mingw/?source=dlp
  That's the compiler that isn't actually there, you need to have it installed in order to use it.
When installing i checked the c++ option for when i eventually learn enough to move up to it.
  After installation is complete open CodeBlocks.
Go to settings>Compiler>ToolChainExecutables and click the auto-detect button, and it should now detect the compiler you have just installed.

  Hope this is to some use :) "This is all assuming you are using Windows btw"

For future readers, When you download codeblocks, the first two options do not download the compiler with it. The third 4th do.

srenac

THIS really helped me. Beginner over here and this quickly fixed the problem. THANKS (:


22990atinesh

Quote from: laYahooz on January 04, 2013, 11:06:00 PM
I had a similar problem. Please note I'm a total n00b in C++ and IDE's but heres what I did (after some research)
So of course I downloaded the version that came with the compiler and it didn't work. Heres what I did:
1) go to settings in the upper part
2) click compiler
3) choose reset to defaults.

Hopefully this works  :-\

Kudos Bro Finally It worked for me too.

Uncreative

I tried the first method suggested (restoring to defaults) and it didn't work. I think this was because there was no gnu gcc exe file. Then I tried the second method, downloading the compiler from online, and Code::Blocks did recognize the compiler, but when I tested the compiler on the default Hello World program, I got this error message:

-------------- Build: Debug in Starter project (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -Wall -fexceptions -g -pedantic -Wextra -Wall  -c "C:\Users\ALEX\Desktop\CodeBlocks\share\CodeBlocks\images\Projects\Starter project\main.cpp" -o obj\Debug\main.o
Execution of 'mingw32-g++.exe -Wall -fexceptions -g -pedantic -Wextra -Wall  -c "C:\Users\ALEX\Desktop\CodeBlocks\share\CodeBlocks\images\Projects\Starter project\main.cpp" -o obj\Debug\main.o' in 'C:\Users\ALEX\Desktop\CodeBlocks\share\CodeBlocks\images\Projects\Starter project' failed.

So, what now?

stahta01

Quote from: Uncreative on July 14, 2014, 11:27:05 AM
I tried the first method suggested (restoring to defaults) and it didn't work. I think this was because there was no gnu gcc exe file. Then I tried the second method, downloading the compiler from online, and Code::Blocks did recognize the compiler, but when I tested the compiler on the default Hello World program, I got this error message:

-------------- Build: Debug in Starter project (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -Wall -fexceptions -g -pedantic -Wextra -Wall  -c "C:\Users\ALEX\Desktop\CodeBlocks\share\CodeBlocks\images\Projects\Starter project\main.cpp" -o obj\Debug\main.o
Execution of 'mingw32-g++.exe -Wall -fexceptions -g -pedantic -Wextra -Wall  -c "C:\Users\ALEX\Desktop\CodeBlocks\share\CodeBlocks\images\Projects\Starter project\main.cpp" -o obj\Debug\main.o' in 'C:\Users\ALEX\Desktop\CodeBlocks\share\CodeBlocks\images\Projects\Starter project' failed.

So, what now?

I suggest NOT using space in paths while compiling with any MinGW GCC compiler.
Some can use them some can not.

I suggest NOT using C:\Users\ALEX\Desktop because the Windows security and antivirus are more likely to think it is a virus attack.

I also suggest starting a new thread since this one has nothing to do with your current problem.

I have tried to locate the problem in another thread http://forums.next.codeblocks.org/index.php/topic,19453.msg132925/topicseen.html#msg132925
Please read it and if your problem is still failed you can use that thread to ask for more help.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]