User forums > Using Code::Blocks
[Solved]c++ 11 standard argument is only added using the additional option
oBFusCATed:
What does it mean it does not work?
Have you inspected the full log?
If the option is there then it works. If it is not then it doesn't.
Keep in mind that from the it is up to the installed compiler if it supports c++11 or not.
Jewest:
please see the attached logs
The succes log is with the additional project c++ 11 option on.
The fail is without.
search for "Release/radicentre/src/fdmsg.o"
You will see that the gcc call is missing -std=c++11 while in the log that is a succes this is added.
The major difference is that the gcc and the g++ parameters are different.
With the additional option this is corrected/ worked around.
Version 12.11 of c::b did not have this problem, here the g++ and gcc arguments are the same.
oBFusCATed:
Probably the problem is that newer versions of C::B distinguish between c and c++ flags (I think).
And thus c++ flags (like std=c++11) are not passed to the C compiler.
The real problem here is that you've setup your build to use gcc (C compiler) for building c++ files.
I don't know why you do it, but most of the times it is not a good idea.
Jewest:
I think I understand what the problem is .
The difference between the gcc and the g++ calls is time.
All the gcc calls are files that exist in the project file from the moment I started.
The g++ file calls are all files that have been added later on in the project.
So the assumption I make at this moment, is that C::B handling of the files has changed.
Apparently the migration from one version to the other has introduced this difference in the call.
The only question I have is how do I change this?
The file properties(compiler variable) for old files is CC while the new files are CPP.
Do I need to go through the while project file with an editor to change CC to CPP?
Jewest:
Removing the CC option from the C:::B project file has solved the reported issue
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version