Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: earlgrey on May 24, 2014, 06:06:54 am

Title: mixed C and C++ : GNU gcc / g++ options
Post by: earlgrey on May 24, 2014, 06:06:54 am
Say you have one C::B project with mixed C and C++ files.

Is there a way to differentiate g++ from gcc options in the C::B GUI, because I would like to get rid
of this warning :

========================================================================
cc1: warning: command line option ‘-fno-rtti’ is valid for C++/ObjC++ but not for C [enabled by default]
========================================================================

Seems like C::B invoke gcc with g++ options.

Regards to C::B Team.
Title: Re: mixed C and C++ : GNU gcc / g++ options
Post by: stahta01 on May 24, 2014, 09:10:37 am
Did you try right clicking on the "Compiler Flags" and adding it as a C++ only flag?

Tim S.

Title: Re: mixed C and C++ : GNU gcc / g++ options
Post by: earlgrey on May 24, 2014, 09:18:49 am
My option is not in the list

-fno-rtti

I wrote it manually in the "other options" tab
Title: Re: mixed C and C++ : GNU gcc / g++ options
Post by: oBFusCATed on May 24, 2014, 09:40:52 am
Then did try this:

Did you try right clicking on the "Compiler Flags" and adding it as a C++ only flag?
Title: Re: mixed C and C++ : GNU gcc / g++ options
Post by: earlgrey on May 24, 2014, 01:18:20 pm
OK, add "new flag"

I need to go to an eye-specialist.

Sorry for the forum noise.