Author Topic: can't find compiler executable in your search path (GNU GCC compiler)  (Read 484894 times)

Offline pb910

  • Single posting newcomer
  • *
  • Posts: 2
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.
« Last Edit: January 04, 2013, 08:05:11 pm by pb910 »

Offline laYahooz

  • Single posting newcomer
  • *
  • Posts: 2
Re: can't find compiler executable in your search path (GNU GCC compiler)
« Reply #1 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  :-\

Offline pb910

  • Single posting newcomer
  • *
  • Posts: 2
Re: can't find compiler executable in your search path (GNU GCC compiler)
« Reply #2 on: January 06, 2013, 12:56:37 am »
yes that worked, thanks  :)

blahzay

  • Guest
Re: can't find compiler executable in your search path (GNU GCC compiler)
« Reply #3 on: March 29, 2013, 03:53:25 pm »
yes thanks, that worked for me too. 
 :)

Offline natedoggy

  • Single posting newcomer
  • *
  • Posts: 3
Re: can't find compiler executable in your search path (GNU GCC compiler)
« Reply #4 on: April 11, 2013, 03:14:46 am »
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

Offline stahta01

  • Lives here!
  • ****
  • Posts: 5899
    • My Best Post
Re: can't find compiler executable in your search path (GNU GCC compiler)
« Reply #5 on: April 11, 2013, 01:50:42 pm »
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

http://wiki.codeblocks.org/index.php?title=Installing_a_supported_compiler#Compiler-neutral_setup_steps

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Testing, compiling CB Trunk against wxWidgets 3.0.2.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline natedoggy

  • Single posting newcomer
  • *
  • Posts: 3
Re: can't find compiler executable in your search path (GNU GCC compiler)
« Reply #6 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.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 5899
    • My Best Post
Re: can't find compiler executable in your search path (GNU GCC compiler)
« Reply #7 on: April 12, 2013, 05:31:52 am »
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++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Testing, compiling CB Trunk against wxWidgets 3.0.2.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline natedoggy

  • Single posting newcomer
  • *
  • Posts: 3
Re: can't find compiler executable in your search path (GNU GCC compiler)
« Reply #8 on: April 19, 2013, 01:08:04 am »
i dont know what you mean

SmittenJKitten

  • Guest
Re: can't find compiler executable in your search path (GNU GCC compiler)
« Reply #9 on: April 22, 2013, 05:07:10 pm »
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.
« Last Edit: April 22, 2013, 05:16:39 pm by SmittenJKitten »

srenac

  • Guest
Re: can't find compiler executable in your search path (GNU GCC compiler)
« Reply #10 on: October 09, 2013, 07:27:26 am »
THIS really helped me. Beginner over here and this quickly fixed the problem. THANKS (:

nullne

  • Guest
Re: can't find compiler executable in your search path (GNU GCC compiler)
« Reply #11 on: October 10, 2013, 11:12:07 am »
thanks ,though i do not know why

Offline 22990atinesh

  • Single posting newcomer
  • *
  • Posts: 4
Re: can't find compiler executable in your search path (GNU GCC compiler)
« Reply #12 on: April 03, 2014, 11:41:54 am »
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

  • Guest
Re: can't find compiler executable in your search path (GNU GCC compiler)
« Reply #13 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?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 5899
    • My Best Post
Re: can't find compiler executable in your search path (GNU GCC compiler)
« Reply #14 on: July 14, 2014, 04:32:48 pm »
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.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.
« Last Edit: July 14, 2014, 07:08:15 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Testing, compiling CB Trunk against wxWidgets 3.0.2.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org