Author Topic: ... uses an invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]  (Read 145979 times)

Offline zyd

  • Multiple posting newcomer
  • *
  • Posts: 25
H!, I install C::B on fedora8 using source code, I have a problem: it can't compile a project,
error tips like this:
"LogTest - 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...
Nothing to be done.

My OS installed g++... what can i do for this ?

mariocup

  • Guest
Hi zyd,

go to menu "Settings->Compiler and debugger" of codeblocks. Then select you compiler in the drog down list and choose the tab "Toolchain executables". Now configure the path of the compiler binaries e.g. /usr/local. Do not add the bin-path (read the note!!).

Bye,

Mario

Offline zyd

  • Multiple posting newcomer
  • *
  • Posts: 25
Hi Mario:

thanks.
 :)

keltix

  • Guest
THANX MARIO!!!!!!! i signed up just to say that

newb22

  • Guest
hey how do you find the complier binaries
thanks

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
hey how do you find the complier binaries
thanks

Depends on which compiler you installed; Operating System also makes a difference.

Tim S

PS, The Physic has this century off.
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

aredhel_vlsi

  • Guest
Hello I am a MAC OS X user  and I still have the problem. Where should I configurate the path, I have no local directory.

Offline AdamHk90

  • Single posting newcomer
  • *
  • Posts: 4
Hello I am also a mac user (OSX 10.58) that is having problems with the compiler settings in Codeblocks. This is my first time using Codeblocks on a mac and yes, I have installed Xcode v3.2. I have searched all the forums on the internet regarding setting up the correct toolchain path for the GNU GCC Compiler. However, I have been unsuccessful in compiling any of my code. I don't know where the correct compiler installation directory on my mac is, therefore, I have am not able to link to it. The auto-detect feature has not been able to detect the GNU GCC compiler.  However, I have linked all the bin files in the toolchain executables setting page correctly (I think).

I linked the bin files to the following directory: Developer/usr/bin

C compiler: gcc-4.0 (bin)
C++ compiler: g++-4.0 (bin)
Linker for dynamic libs: g++-4.0 (bin)
Linker for static libs: ar (bin)
Resource compiler: left blank
Make program: gnumake (bin)

I have used Codeblocks successfully on windows, but I would like to use Codeblocks on my mac. Any help would be much appreciated.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Try "/usr" instead of "/usr/bin" Under windows Code::Blocks adds the bin to the path.

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 AdamHk90

  • Single posting newcomer
  • *
  • Posts: 4
I have attached a screen shot of my compiler settings that are still causing a compiling error. Any mac users of codeblocks dealt with this problem?

I have tried /usr and /Developer/usr both with no success.

[attachment deleted by admin]
« Last Edit: February 05, 2012, 11:28:16 pm by AdamHk90 »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Where is your compiler located on your filesystem?
Open a terminal and type "whereis gcc-4.0". Then add the correct path (without the bin at the end) to the settings.
(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!]

Offline AdamHk90

  • Single posting newcomer
  • *
  • Posts: 4
I was able to link to the appropriate path for the gcc compiler (at least the auto-detect feature confirmed the correct gcc path). However, I have a new problem when compiling my code. The header files are not in the directory. I have attached a screen shot of the error messages I received when compiling my code in codeblocks. Also, when I close a project in codeblocks after failing to compile my code, codeblock does not close properly it just terminates unsuccessfully. For example I go to file click close project and then the codeblocks program itself closes and generates an error report. I just want to close a project not the codeblocks program.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Are you compiling a C or a C++ file?
What is the file extension?

Turn on full compiler logging.

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 AdamHk90

  • Single posting newcomer
  • *
  • Posts: 4
I am compiling a C++ file, .cpp.
I have turned on full compiler logging and tried to compile my C++ code. The error message under the "Build messages" tab generated the same errors as before with no added information.