News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

mixed C and C++ : GNU gcc / g++ options

Started by earlgrey, May 24, 2014, 06:06:54 AM

Previous topic - Next topic

earlgrey

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.
* OS = Debian Buster - Linux 4.19.06 x64 SMP
* C::B = svn11267 wx-3.0.4 - Linux, unicode 64 bit

stahta01

#1
Did you try right clicking on the "Compiler Flags" and adding it as a C++ only flag?

Tim S.

C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

earlgrey

#2
My option is not in the list

-fno-rtti

I wrote it manually in the "other options" tab
* OS = Debian Buster - Linux 4.19.06 x64 SMP
* C::B = svn11267 wx-3.0.4 - Linux, unicode 64 bit

oBFusCATed

Then did try this:

Quote from: 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?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

earlgrey

OK, add "new flag"

I need to go to an eye-specialist.

Sorry for the forum noise.

* OS = Debian Buster - Linux 4.19.06 x64 SMP
* C::B = svn11267 wx-3.0.4 - Linux, unicode 64 bit