Sunday, January 6, 2013

Eclipse CDT semantic errors but can compile, how to fix?

I recently was using Eclipse CDT as an alternative of Visual Studio for development.
And it sometimes shows semantic errors but the project can actually be compiled successfully.

I found this post: http://stackoverflow.com/questions/8148235/eclipse-cdt-shows-semantic-errors-but-compilation-is-ok

To solve it:
Click on File->Properties->C/C++ general->Indexer,
where you will find a tab on the top: Enable project specific settings.
You need to check this box.

Then roll all way down to the bottom, you will find an option:
Build configuration for the indexer.
Choose "Use active build configuration"

This works perfectly for me.

1 comment:

  1. Project Properties->C/C++ General->Paths and Symbols->GNU C++-> "add the correct include root path"

    For example in my case the Window.hpp and System.hpp are in "C:\SFML-2.3.2\include\SFML".

    ReplyDelete