News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

G++ in C program???

Started by virtual008, June 06, 2008, 11:46:53 AM

Previous topic - Next topic

virtual008

I just installed code::blocks and it wouldn't compile a C program without g++.I'm confused does code::blocks use G++ in C or is it just a dependency error?


dje

Hi !

Did you use the .c extension and not .cpp ?
Did you check your toolchain ?

Dje

virtual008

#2
Yes I used .c for my files and after I installed G++ it worked fine.I don't think it uses G++ because I tried to use classes and templates to test it and it had C90 warnings.I just was just wondering why It needed G++ for a C program.

Thanks for replying

Ceniza

IIRC, it's because Code::Blocks links your files using the g++ executable. If that's really the reason, just modify the toolchain executables in the Compiler settings to use gcc instead of g++ to link.