Author Topic: Toolchain path not setup correctly  (Read 15222 times)

slowhand

  • Guest
Toolchain path not setup correctly
« on: April 18, 2011, 05:31:54 pm »
Help!  I keep getting the following message when trying to Build and Run my "MCGuts" project:

"MCGuts - Debug" uses an invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]. Probably the toolchain path within the compiler options is not setup correctly?! Skipping...

When I go to Settings->Compiler and Debugger -> Toolchain executables tab
I see that the Compiler's Installation directory is set to
C:\Program Files\CodeBlocks\bin
( a file which I created)

The C++ compiler is set to: mingw32-g++.exe

Please help, i am new to Code::Blocks.

Leigh

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: Toolchain path not setup correctly
« Reply #1 on: April 18, 2011, 07:18:57 pm »
Did you install a Compiler?
If no, Install one!

Note: if you manually created the folder "C:\Program Files\CodeBlocks\bin" then you DID NOT do the right thing.

Learn to search this site and others; those who fail to learn to use Google are doomed to fail as computer programmers.

Tim S.

I suggest searching this site and read the FAQs http://wiki.codeblocks.org/index.php?title=FAQ

http://lmgtfy.com/?q=site%3Acodeblocks.org+%22invalid+compiler%22
« Last Edit: April 18, 2011, 07:36:50 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

Offline ausairman

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Toolchain path not setup correctly
« Reply #2 on: June 20, 2011, 06:21:18 am »
I've been trying to find a solution to this for a while now, and everywhere it's mentioned there is just a pile of answers saying something along the lines of "look it up" or "it's obvious". Well I'm telling you now that it's NOT obvious. I know it's probably simple but not all of us know where linux has put the compiler. Yes, it may be obvious that Code::blocks requires a compiler, but where that compiler might be is not.

I don't know about everyone else, but when I say that I can't get code::blocks to compile, I don't mean that I don't know how to click on "settings" and browse to a directory, I mean I don't know which directory to browse to, whether the compiler is installed, which compiler I should install and how I would go about doing that.

Instead of patronising everyone who asks this question, it might be helpful just to provide a solution that people can actually understand, then in future you can just link to that answer.
Ubuntu 11.04 (64-bit), optiplex 990 i7

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Toolchain path not setup correctly
« Reply #3 on: June 20, 2011, 06:40:03 am »
Well I'm telling you now that it's NOT obvious. I know it's probably simple but not all of us know where linux has put the compiler.
Well - this is really hard to understand. :shock: If you are a cook wouldn't you need to know where your tools are? I think this is so basic, that it's really hard to believe you said this. IMHO make yourself familiar with the environment you are developing FIRST, then use an IDE. Everything else is not only dangerous, but the outcome is simply undefined.
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

Offline ausairman

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Toolchain path not setup correctly
« Reply #4 on: June 20, 2011, 06:56:16 am »
...And there it is again.

For those of you who came to this page looking for an answer, not abuse, this page offers step-by-step instructions for installing the intel c++ libraries on ubuntu:

http://software.intel.com/en-us/articles/using-intel-compilers-for-linux-with-ubuntu/

Hope this helps.
Ubuntu 11.04 (64-bit), optiplex 990 i7

Offline ausairman

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Toolchain path not setup correctly
« Reply #5 on: June 20, 2011, 07:04:53 am »
If you are a cook wouldn't you need to know where your tools are? I think this is so basic, that it's really hard to believe you said this.

I think you've misunderstood my situation. I'm not new to c++, and I'm quite familiar with the way compilers work. What I am new to, is linux and code::blocks. And to take your analogy, I am a cook in a new restaurant, and I'd love to know where the tools are but every time I ask, I get every moron in the room shouting "that's obvious!". Every forum I've been to has been polite to those of us who have read the forum guidelines, have searched the topic before posting, and have provided as much info as possible. Here it seems like the thing is to lambast the noobs.
Ubuntu 11.04 (64-bit), optiplex 990 i7

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Toolchain path not setup correctly
« Reply #6 on: June 20, 2011, 09:23:43 am »
Every forum I've been to has been polite to those of us who have read the forum guidelines, have searched the topic before posting, and have provided as much info as possible. Here it seems like the thing is to lambast the noobs.
Well, first of all - which compiler do you want to use? MinGW/GCC?
Second: Where is it installed, what compiler pack (version...) did you choose?
Third: Are you sure you installed the compiler correctly? E.g. MinGW / GCC sometimes ships in two (or more) parts, splitting the C from the C++ compiler. So just installing the C compiler will obviously not be enough.
Finally: Do you point to the root directory of the compiler (as written on the compiler setup page), not any subfolder?

You can"debug" what you are doing at the command line: Try to compile a hello world app to see if the compiler itself is setup correctly.
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

ttphillips

  • Guest
Re: Toolchain path not setup correctly
« Reply #7 on: December 30, 2011, 04:35:13 am »
for anyone having this problem the solution is as follows:
1. start codeblocks
2.goto settings tab
3. goto compiler debugger
4.goto toolchains executable tab
5.see compiler installation directory
6. click on auto detect. then click OK
this should fix your problem. the auto detect feature sets up the proper directory path for your compiler.
have a great day.

Thorn

DaveJC

  • Guest
Re: Toolchain path not setup correctly
« Reply #8 on: January 01, 2012, 05:25:10 pm »
Thank you that's the useful information we were all after. See now we know we won't have to ask this simple question again. Once again thanks.

Dave.

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: Toolchain path not setup correctly
« Reply #9 on: January 02, 2012, 06:52:42 am »
The wiki has had this information since 2005.