mercredi 11 mars 2015

c++11 Eclipse luna indexer/compiler not working

I am having an issue using c++11 feature in eclipse Kepler/Luna. I have followed these suggestions:


Eclipse CDT C++11/C++0x support Set C++11 in Eclipse CDT Luna Enabling C++11 in Eclipse Juno/Kepler/Luna CDT http://ift.tt/1f0u7eh


And none of them worked for me.


I can’t get the indexer or the compiler to recognize anything to do with c++11?


Here is the console output during my compile:


g++ -std=c++0x -D__cplusplus=201103L -D__GXX_EXPERIMENTAL_CXX0X__ -O0 -g3 -Wall -c -fmessage-length=0 -o "src\xxxx.o" "..\src\ xxxx.cpp"


So I have “-std=c++0x” “-D__cplusplus=201103L” and “-D__GXX_EXPERIMENTAL_CXX0X__” in my compile…


These options seem to be the theme of most of the thread mentioned above, but they are not doing anything for me.


As far as the indexer goes I have added in the:


“${COMMAND} -E -P -v -dD "${INPUTS}" -std=c++11”


To the “Preprocessor Include Paths, Macros etc”


Then I rebuild the index and restart eclipse for good measure and still nothing. No recognition of anything c++11 related.


So here is my question:


It is my understanding that you need gcc 4.7 or higher to support c++11. How do I check what version of gcc eclipse is using? I am guessing if it is using an older version of gcc prior to 4.7 then all the compiler options in the world will do me no good.


Aucun commentaire:

Enregistrer un commentaire