User forums > Using Code::Blocks

It seems that this project has not been built yet. Do you want to build it now?

<< < (2/2)

oBFusCATed:
Offtopic: I've always wandered why the c and c++ compilers are not separated as two compilers.
I've added some global options to the compiler that are c++ only and when I compile C project (oneof the C::B projects is written in C) I get warnings "-fsomething is not available in C mode" or something like that.


p.s. I know the answer (or at least one of the aswers) -> to be able to have c and c++ code in one project.

hbucius:

--- Quote from: jens on August 03, 2010, 09:57:34 am ---
--- Quote from: oBFusCATed on August 03, 2010, 09:19:51 am ---g++ can link both c and c++ projects, so C::B uses it for both.

To change that go to Settings -> Compiler & Debugger -> Compiler -> Toolchain executables

--- End quote ---
You have two options: either use gcc for linkiung, but be aware, that you will get errors when you later switch to c++, because gcc can not link c++ objects
or install also g++, even if you do not use c++ at the moment.

I recommend the second option.


--- End quote ---

thank you ,i did as the second one. i change g++ to g++-4.4 in the toolchain executables,and i works.thank you for your help

portunix:
I could resolve this problem doing the next:I installed the synaptic. Logged in as sudo, type: apt-get install synaptic. Type in the search field: g++. With the right button, mark "select for install", then press "mark". After that, press apply. Open the Codeblocks and test.

Navigation

[0] Message Index

[*] Previous page

Go to full version