Author Topic: can't find compiler executable in your search path (GNU GCC compiler)  (Read 808016 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: 7582
    • 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 64 bit.
--
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: 7582
    • 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 64 bit.
--
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: 7582
    • 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 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Cybermaze

  • Guest
Re: can't find compiler executable in your search path (GNU GCC compiler)
« Reply #15 on: August 09, 2014, 06:54:05 pm »
I had the same problem.

Installing latest Code::Blocks 13.12 on Windows 8.1 with compiler, the program could not find the compiler.

Thank you laYahooz, your suggestion worked, now I can start programming :)

zakou3570

  • Guest
Re: can't find compiler executable in your search path (GNU GCC compiler)
« Reply #16 on: September 29, 2014, 05:56:48 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  :-\


Donload  MinGW     Instaler from this link     http://www.mingw.org/category/wiki/download                up right corner is the button   run instaler exe then you need to open the program  and make update then check the base system packages  it wil be downloaded the instaled   then do the reset compiler thing other people say in this post you wil be fine   hope i helped

Holmz

  • Guest
Re: can't find compiler executable in your search path (GNU GCC compiler)
« Reply #17 on: October 02, 2014, 08:19:19 am »
Similar issues on a mac (OSX10.9)

which icc says:
/usr/bin/icc

which fort says:
/usr/bin/ifort

The icc link in the code blocks says:
Scanning for lexers in /Applications/CodeBlocks.app/Contents/Resources/share/codeblocks/lexers/...
Found 46 lexers
...
Script plugin registered: Find Broken Files plugin
Script/function 'edit_startup_script.script' registered under menu '&Settings/-Edit startup script'

Current compiler 'Intel C/C++ Compiler' doesn't have correctly defined debugger!
Current compiler 'Intel C/C++ Compiler' doesn't have correctly defined debugger!
Current compiler 'Intel C/C++ Compiler' doesn't have correctly defined debugger!


And there seems to be only gfort (etc)... But no fort?
« Last Edit: October 02, 2014, 08:22:36 am by Holmz »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: can't find compiler executable in your search path (GNU GCC compiler)
« Reply #18 on: October 02, 2014, 09:20:39 pm »
Are you able to build your project?
This message tells you that debugger won't work for  the ifort/icc compilers.
You should be able to build your projects just fine (if everything else is setup correctly).
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Eezageeza

  • Guest
Re: can't find compiler executable in your search path (GNU GCC compiler)
« Reply #19 on: March 01, 2016, 07:02:36 am »
Hello World!

I'm a total beginner and had an absolute nightmare trying to get Code Blocks to find and use a compiler. The information on the internet is rather inpenetrable and isn't always correct. It took a frustrating and disheartening effort to solve, at least enough for a beginner.

However, I solved my problem enough to practice coding!!   :D

This is what I did.

I reinstalled Code Blocks into my C: drive  (it was in D: previously, though I don't know if that made any difference or not)

I then went here:
https://sourceforge.net/projects/tdm-gcc/?source=typ_redirect
and downloaded TDM-GCC MinGW Compiler in the C: drive.

I then reloaded Code Blocks, settings >> compiler >> global compiler settings >> Tool Chain Executables Tab (to check the fields). The compiler was selected as GNU GCC Compiler. I then clicked "auto detect".

It FINALLY found the compiler.   :D :D :D :D

This is what worked for me after hours of fruitless searching and inpenetrable reading. The key I think in my case, was the TDM-GCC MinGW Compiler download. Now, I don't know if this is the real, useful deep way to begin a multimillion dollar systems development lifecycle, but it will do for practicing beginner code.
Perhaps looking at the tool chain executables may have been redundant, but I just said what I did.
I hope this may help any who remain frustrated.

« Last Edit: March 01, 2016, 07:06:53 am by Eezageeza »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: can't find compiler executable in your search path (GNU GCC compiler)
« Reply #20 on: March 01, 2016, 08:47:35 am »
I reinstalled Code Blocks into my C: drive  (it was in D: previously, though I don't know if that made any difference or not)
I then went here:
https://sourceforge.net/projects/tdm-gcc/?source=typ_redirect
Why didn't you simply install the version that has the compiler included? You should have read carefully the download page. Its written there.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

jaitan

  • Guest
Re: can't find compiler executable in your search path (GNU GCC compiler)
« Reply #21 on: October 03, 2016, 03:34:07 pm »
Probably the folder of the GNU compiler is in some other IDE that you have installed, search the files from your computer to the folder "MinGW"

Franexator

  • Guest
Re: can't find compiler executable in your search path (GNU GCC compiler)
« Reply #22 on: November 05, 2016, 02:07:58 pm »
1)uninstall your codeblocks.
2) download the binary one named codeblocks-16.01mingw-setup.exe from here: https://sourceforge.net/projects/codeblocks/files/Binaries/16.01/Windows/codeblocks-16.01mingw-setup.exe/download
3) after installing the new codeblocks, go to settings>compiler and in the compiler flags, whlie you have choosen GNU GCC compiler, mark the second square (C++11).

Worked for me.
GL  :-\

Offline rory

  • Single posting newcomer
  • *
  • Posts: 2
Re: can't find compiler executable in your search path (GNU GCC compiler)
« Reply #23 on: June 21, 2017, 01:38:14 am »
Thanks pb, worked for me. appreciated.

Offline NotMyMonkeys

  • Single posting newcomer
  • *
  • Posts: 2
Re: can't find compiler executable in your search path (GNU GCC compiler)
« Reply #24 on: October 20, 2021, 11:41:21 am »
Thanks for the historical helpdesk!

I followed SmittenJKittens advice and found the setting that was directing CodeBlocks to the wrong path.

settings>Compiler>ToolChainExecutables and click the auto-detect button.

/* Disclaimer: this is not my circus..... */