Author Topic: G++ instead of GCC for C files on Lubuntu.  (Read 2421 times)

Offline guillaumec

  • Single posting newcomer
  • *
  • Posts: 8
G++ instead of GCC for C files on Lubuntu.
« 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

Online stahta01

  • Lives here!
  • ****
  • Posts: 6590
    • My Best Post
Re: G++ instead of GCC for C files on Lubuntu.
« Reply #1 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

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 guillaumec

  • Single posting newcomer
  • *
  • Posts: 8
Re: G++ instead of GCC for C files on Lubuntu.
« Reply #2 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.

Online stahta01

  • Lives here!
  • ****
  • Posts: 6590
    • My Best Post
Re: G++ instead of GCC for C files on Lubuntu.
« Reply #3 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.
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 guillaumec

  • Single posting newcomer
  • *
  • Posts: 8
Re: G++ instead of GCC for C files on Lubuntu.
« Reply #4 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 :)

Offline guillaumec

  • Single posting newcomer
  • *
  • Posts: 8
Re: G++ instead of GCC for C files on Lubuntu.
« Reply #5 on: August 05, 2016, 05:42:33 pm »
Hi,
Thnaks for help, it works :)