Author Topic: mixed C and C++ : GNU gcc / g++ options  (Read 7872 times)

Offline earlgrey

  • Multiple posting newcomer
  • *
  • Posts: 101
mixed C and C++ : GNU gcc / g++ options
« 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.
* OS = Debian Buster - Linux 4.19.06 x64 SMP
* C::B = svn11267 wx-3.0.4 - Linux, unicode 64 bit

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: mixed C and C++ : GNU gcc / g++ options
« Reply #1 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.

« Last Edit: May 24, 2014, 09:12:35 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline earlgrey

  • Multiple posting newcomer
  • *
  • Posts: 101
Re: mixed C and C++ : GNU gcc / g++ options
« Reply #2 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
« Last Edit: May 24, 2014, 09:22:08 am by earlgrey »
* OS = Debian Buster - Linux 4.19.06 x64 SMP
* C::B = svn11267 wx-3.0.4 - Linux, unicode 64 bit

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: mixed C and C++ : GNU gcc / g++ options
« Reply #3 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?
(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!]

Offline earlgrey

  • Multiple posting newcomer
  • *
  • Posts: 101
Re: mixed C and C++ : GNU gcc / g++ options
« Reply #4 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.

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