Ikarus
Ikarus

Reputation: 1193

Enable C++14 syntax checking in Eclipse

I'm using Eclipse Mars.2 Release (4.5.2) in Windows. C++11 works well, but for C++14, I can build and run a project using C++14 features without any error, but the IDE always highlights errors in the lines using C++14 features, it makes me difficult to detect real errors.

E.g. When using std::make_unique, it always highlight a bug symbol with notification "Symbol 'make_unique' could not be resolved".

How do I enable C++14 Syntax checking in Eclipse?

My current configuration:

Project property -> C/C++ build -> Setting -> Preprocessor -> Defined symbols:

Project property -> C/C++ build -> Setting -> Miscellaneous-> other flags:

Upvotes: 7

Views: 8632

Answers (2)

Ram
Ram

Reputation: 21

Keeping the Project property -> C/C++ build -> Setting -> Miscellaneous-> other flags:

-c fmessage-length=0 -std= c++0x

should work..

Upvotes: 1

Derek Lesho
Derek Lesho

Reputation: 338

You are going at this the wrong way. To change the compiler and indexer, go to Properties -> C/C++ Build -> Settings. Under GCC C++ Compiler select the Dialect menu. In the Language standard drop down, select C++1y. I don't think the support is full yet however.

Upvotes: 6

Related Questions