Eclipse Indexer Errors When Using Stl with Android Ndk

Eclipse indexer errors when using STL with Android NDK

You have to add path to STL to project settings so that Eclipse indexes it as well. Project->Properties->C/C++ General->Includes. Here's what I have added:

<path_to_NDK>/sources/cxx-stl/gnu-libstdc++/include
<path_to_NDK>/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include
<path_to_NDK>/platforms/android-9/arch-arm/usr/include

Fixing Eclipse errors when using Android NDK and std::vector

I've added ${NDKROOT}/sources/cxx-stl/gnu-libstdc++/include

In my project config under C++ General -> Paths and Symbols -> include

Yes, that's it. I've tried to add the same with the same result.
However, if you add stl_port headers

${NDKROOT}/sources/cxx-stl/stlport/stlport

It will do the trick. Of course it is not necessary to change

APP_STL := stlport_static

as it works only in eclipse indexes. It will be usefull until you are going to use something that exists in gnu-libstdc++ and doesn't exist stl-port.

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.

Syntax error notification in native code in Eclipse using the newest NDK r8d

My experience is that Eclipse often gives wrong errors for c++ projects, even if it compiles correctly. This is because the runtime c++ checker is not perfect.

My solution was to turn off all checks in the Project Properties -> C/C++ General -> Code Analysis. This way, there's no live feedback, but all errors shown are at least real

Android NDK Source Compiled & Build Successfully - But Function 'to_string' could not be resolved in Eclipse IDE

After referring the answer by @Khaled Lakehal, I myself posting this answer for my question.Hope this may help someone.

Followed the below step to make it work:

  1. Update the eclipse version from Luna to latest Mars 2
  2. Imported the existing project from the old version of the eclipse
    using -> import -> Existing Android code into Workspace
  3. Had some problem with the C/C++ project conversion after import. So followed this link to undo the C/C++ project conversion
  4. Converted the project to C/C++ newly.
  5. To remove the error, I referred this link, and selected the "Run with build" only
  6. Close & Reopen the IDE

So now able to use the std::to_string & std::stoll functions.



Related Topics



Leave a reply



Submit