Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: guillaumec on August 03, 2016, 03:56:40 pm

Title: G++ instead of GCC for C files on Lubuntu.
Post by: guillaumec on August 03, 2016, 03:56:40 pm
Hi,
I'm new with CodeBlocks on Linux (Lubuntu).
My problem is that codeblock try to compile my c files with G++ instead of GCC.
First, it used well gcc , but final compilation is with G++
Do you have had this problem ?
Is this allright ?
In project ->buil options, I've Gnu CC ...
I don't know if all is right...
Thank for help
Title: Re: G++ instead of GCC for C files on Lubuntu.
Post by: stahta01 on August 03, 2016, 10:26:37 pm
If you are ONLY compiling C files; I would change the toolchain setting to use gcc as the linker instead of g++.

If you do both; I would suggest making a copy of the compiler and setting the copy to "gcc" instead of "g++".

Link that directs to the location of toolchain setting.
http://wiki.codeblocks.org/index.php/Installing_a_supported_compiler#Compiler-neutral_setup_steps (http://wiki.codeblocks.org/index.php/Installing_a_supported_compiler#Compiler-neutral_setup_steps)

Tim S.
Title: Re: G++ instead of GCC for C files on Lubuntu.
Post by: guillaumec on August 03, 2016, 11:13:07 pm
Hi,
thanks for answer.
I, for the moment, do only C. But, when I've installed CB, and tried to compile the "hello world" project, in C with main.c,  CB tells me that G++ wasn't on my system...
That why I ask my question.
Title: Re: G++ instead of GCC for C files on Lubuntu.
Post by: stahta01 on August 03, 2016, 11:40:24 pm
And, I told you how to fix that issue.

Do you still need any more help?

Tim S.
Title: Re: G++ instead of GCC for C files on Lubuntu.
Post by: guillaumec on August 03, 2016, 11:42:51 pm
Hi,
I'll test it tomorrow, thank you.
It's late here, and I've seen your post, but it was for all which may have the same problem.
Thank's for help :)
Title: Re: G++ instead of GCC for C files on Lubuntu.
Post by: guillaumec on August 05, 2016, 05:42:33 pm
Hi,
Thnaks for help, it works :)