Eclipse CDT complains about unresolved functions but still builds successfully

后端 未结 5 695
轮回少年
轮回少年 2021-01-18 07:26

The following C++ application compiles and runs successfully within Eclipse CDT but the IDE is still reporting an error stating:



        
相关标签:
5条回答
  • 2021-01-18 07:32

    At preferences -> c/c++ -> Editor -> Indexer disable indexer, apply, go back to preferences, and enable index again. This makes Eclipse to re-index the workspace. After that, my false red signs on the right side of the editor were gone.

    0 讨论(0)
  • 2021-01-18 07:36

    what helped me was on the jni folder press the right mouse button properties > c/c++ general > paths and symbols add the same paths as in project > properties c/c++ general > paths and symbols

    hope it helps

    0 讨论(0)
  • 2021-01-18 07:44

    The directory /usr/include (where wchar.h resides) is definitely listed within the Include path as otherwise the application would not compile

    I guess this directory is listed only in compiler Include path. This directory has to be listed in Eclipse C++ parser Include path as well, to resolve functions correctly.

    0 讨论(0)
  • 2021-01-18 07:46

    Ok, if /usr/include is listed correctly, then go to preferences -> c/c++ -> Editor -> Indexer -> select Indexer

    Sometimes change it from fast c/c++ indexer to the Full one resolves the problem.

    Hope it helps

    0 讨论(0)
  • 2021-01-18 07:48

    I had the same problem with my Juno Release, Build id: 20120510-1218 on Fedora 14. To solve the index problem: Navigate to preferences -> c/c++ -> Editor -> Indexer -> uncheck "Allow heuristic resolution of includes"

    -All the best

    0 讨论(0)
提交回复
热议问题