Eclipse compiles successfully but still gives semantic errors
In your selected project preferences within the Eclipse environment, go to C/C++ General -> Code Analysis -> Launching. Make sure that both check boxes are unchecked. Close and reopen the project or restart eclipse and rebuild the project.
c++11 code generates semantic errors in Eclipse, can't change build settings
First, make sure that your project compiles correctly.
After that, go to C/C++ Build->Tool Chain Editor and choose Current toolchain: Linux GCC (you may need to switch off Display compatible toolchains only). Make sure that the Current builder is still Android Builder.
Now you have full access to C/C++ General->Paths and Symbols page, with h Includes and # Symbols tabs.
On these two tabs, I add manually
C:/Android/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.6/include
C:/Android/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/include
C:/Android/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.6/include/backward
and
__GXX_EXPERIMENTAL_CXX0X__ = 1
Maybe you need to switch to C/C++ Perspective, right-click on the project and launch Index->Rebuild.
Eclipse indexer shows false-positive semantic errors
I updated Eclipse CDT to version 8.8.1 and the false-positive compile errors don't show up anymore. So after all it was a software bug.
Eclipse CDT flags up a semantic error with forward delaclaration, but compiles with no errors
This is a known bug and is fixed in the upcoming Neon release of Eclipse CDT.
Duplicate Bug report
Eclipse C/C++ Shows Errors but Compiles?
For starters, what color is the underline? This makes a difference, as yellow means it's a warning, and red means it's an error (critical, will not build in most circumstances).
Second, you need to look at the "Problems" tab to see if there are actual errors. If there is nothing there, then it did indeed compile correctly.
Now, back to the original question. Depending on the type of project you are building, this type of behavior is not that uncommon. Eclipse seems to do a poor job of indexing certain projects. When you run "make all" from the command line (which is effectively what Eclipse does during build) it is likely resolving all of your code and building it just fine.
However, Eclipse uses a different, separate tool for indexing all of your source code and resolving variable/function definitions and declarations. This is literally a case of the left hand not knowing what the right hand is doing.
Related Topics
Scrollview Not Scrolling in Android Bottomsheet
Check If Json Object Contains Specific Value
How to Emulate Gps Location in the Android Emulator
How to Select a Video from the Gallery and Get It's Real Path
Android Scrollview Not Scrolling Down After Keyboard Opens
I Get Fragment Not Attached to a Context. What Context Need to Use
App Restarts Rather Than Resumes
Touchableopacity Not Working Inside an Absolute Positioned View
Force Override Camera Image on Android
Android Adb Doesn't See Device
How to Avoid the Frame Layout Is Pushed Up When the Soft Keyboard Appears
How to Fix White Screen on App Start Up
Move to Another Edittext When Soft Keyboard Next Is Clicked on Android
How to Show a Video Thumbnail from a Video Path
How to Make a Link Open an Instagram Page in an App Installed on Android
Unable to Add Window - Token Null Is Not Valid; Is Your Activity Running