Author Topic: Environment error  (Read 410 times)

Offline Code.14

  • Single posting newcomer
  • *
  • Posts: 1
Environment error
« on: March 22, 2020, 11:42:39 am »
When I open my codeblocks apear this error message "Environment error-can't find compiler executable in your configured search path's for GNU GCC compiler". What this mean?

Online stahta01

  • Lives here!
  • ****
  • Posts: 6794
    • My Best Post
Re: Environment error
« Reply #1 on: March 22, 2020, 11:47:07 am »
When I open my codeblocks apear this error message "Environment error-can't find compiler executable in your configured search path's for GNU GCC compiler". What this mean?

That you need to install a compiler or configure CB to use an already installed compiler.

Please read http://wiki.codeblocks.org/index.php/FAQ-General#Q:_What_Code::Blocks_is_not.3F

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

Offline Eboy

  • Single posting newcomer
  • *
  • Posts: 2
Re: Environment error
« Reply #2 on: March 29, 2020, 05:26:22 pm »
the thing is, https://www.fosshub.com/Code-Blocks.html?dwl=codeblocks-20.03mingw-setup.exe This doesn't come with the mingw compiler suite. It says it does, but it's hard for us windows users to find the compiler. The article on the download page says it comes with mingw, but actually doesn't. A work around is to download strawberry perl, but the pathing may mess up the computer IDK for sure to be honest about strawberry perl. Eitherway, it does seem that there's an issue with the installer itself when I click on the full installer and we still can't seem to find the GCC compiler on windows. Pathing may help, but I didn't get any compiler identified when configuring codeblocks fort the first time.

Also, the wiki is quite old, it's still saying the stable version is from 2016 : http://wiki.codeblocks.org/index.php/Main_Page

EDIT : The gcc.exe file is there, but the program can't find the compiler for some weird reason.
« Last Edit: March 29, 2020, 05:38:55 pm by Eboy »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9587
Re: Environment error
« Reply #3 on: March 29, 2020, 05:38:47 pm »
Ok, I downloaded the setup, installed it an ran C::B. The compiler that is included and was installed also was detected properly. So I cannot reproduce.

What are the exact steps you did? Did you unselect something during installation? How big is the executable? Is there a "MinGW" sub- folder in the folder where you installed C::B to? What is that folder?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline Eboy

  • Single posting newcomer
  • *
  • Posts: 2
Re: Environment error
« Reply #4 on: March 29, 2020, 05:41:18 pm »
I think the issue is that it could be detecting a 32bit system on a 64bit system, not entirely sure, and yes, I will make a video if you would prefer on the install process. I gave you a link to the install I chose, which does encompass the mingw/gcc suite. I did select the full install so it should have encompassed the compiler itself.

EDIT : Sent via Private Message the link to the video mortymacfly.

EDIT 2 : https://drive.google.com/file/d/1PxLsIwLDUzidctBlrfRYpqiZMSbzdwoM/view?usp=sharing

EDIT 3 : found out how to solve this.
« Last Edit: March 29, 2020, 06:20:51 pm by Eboy »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9587
Re: Environment error
« Reply #5 on: March 30, 2020, 01:20:41 pm »
https://drive.google.com/file/d/1PxLsIwLDUzidctBlrfRYpqiZMSbzdwoM/view?usp=sharing
Sorry for that, I didn't expect a PM on this and missed it.

So, from what I see in the video: C::B and the compiler are installed just fine. You need to do just one final step.

- Go to the compiler settings (Settings > Compiler)
- Switch to the tab "Toolchain executables"
- Try "Auto-detect"
- If that fails, select the path manually and browse/select your MinGW folder (sub-folder of C::B in your case, NOT the MinGW\bin folder!).
- Also, you may have to change the executable names under "toolchain executables" to gcc.exe, g++.exe (remove the "mingw32" prefix)

That should do it.

Next time, please continue to post in the forums. PM's are easily getting missed/ignored.

Edit: Added last bullet.
« Last Edit: April 01, 2020, 09:45:22 am by MortenMacFly »
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline bonipk

  • Single posting newcomer
  • *
  • Posts: 1
Re: Environment error
« Reply #6 on: March 30, 2020, 11:15:01 pm »
I am having same problem and nothing is working. Could it be the initial window defender message?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9587
Re: Environment error
« Reply #7 on: April 01, 2020, 08:53:17 am »
I am having same problem and nothing is working. Could it be the initial window defender message?
What Windows Defender message?
And what means "nothing is working"?

...and I missed one point:
- You may have to change the executable names under "tlolchain executables" to gcc.exe, g++.exe (remove the "mingw32" prefix).
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ