Eclipse indexing not working

前端 未结 13 2397
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-07 02:20

I am using CDT in Eclipse 3.5.2 Galileo in Ubuntu.

My eclipse\'s indexer doesn\'t work at times. By that I mean when I ctrl click a function it says

相关标签:
13条回答
  • 2021-02-07 02:46
    1. Execute eclipse.exe -clean -refresh where the eclipse is installed.
    2. Create a new C/C++ Project in Eclipse with Given Source code folder path. (Not with New Project based on existing workspace)

    Above steps worked for me.

    0 讨论(0)
  • 2021-02-07 02:48

    Just came across the same problem in my C++ ARM Cross GCC project. I'm developing on Windows, using Makefile and an Ubuntu Docker image with GNU ARM Embedded Toolchain to build the project.

    The solution to get rid of the unresolved symbols, in my case, could be divided into two parts:


    1. The CDT Arm Cross GCC Built-in Compiler Settings didn't have the path to the compiler.

    In the Project Properties -> C/C++ General -> Preprocessor Include Paths -> Providers(tab) the path to the compiler must be provided.

    Using the GNU ARM Embedded Toolchain, the entry for the Command to get compiler specs: I currently use is:

    C:\GNU_Arm_Embedded_Toolchain\9-2020-q2-update\bin\arm-none-eabi-g++.exe ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD "${INPUTS}"
    

    Note: Yes, I am having installed the same toolchain on my Windows machine as I'm using in the Docker image.

    To verify, that the call is correct, you can tick the Allocate console in the Console View, which will provide hlepful output to the Console. Also, in the Entries tab, when you unroll the CDT Arm Cross GCC Built-in Compiler Settings you should see the includes and symbols included.


    1. Missing symbol in the Project Properties -> C/C++ General -> Paths and Symbols menu.

    As I have my defines in the Makefile, I forgot to add the define of my MCU also here.


    Hope this helps to someone! :)

    0 讨论(0)
  • 2021-02-07 02:52

    For me it was issue that when creating a project indexer was chosen as none. Deleted the project and while creating the project again I chose the indexer options as per my need "LINUX_GCC", then it worked for me

    0 讨论(0)
  • 2021-02-07 02:53

    In my case nothing has worked and at last I did the following:

     1) Close the project
     2) Delete the project(do not check from disk option)
     3) create new project with existing code(use the deleted project path)
     4) Successfully indexed my c++ code
    
    0 讨论(0)
  • 2021-02-07 02:57

    To add paths containing code to parse, follow these steps :
    1. Right click on the project
    2. Select Properties
    3. Go to C/C++ General
    4. Go to Path and Symbols
    5. If the paths are missing, add paths.

    To re-parse the code follow these steps :
    1. Right click on the project
    2. Select Index
    3. Rebuild

    If this doesn't work, then you are out of luck. c++ is very difficult language to parse.

    0 讨论(0)
  • 2021-02-07 02:57

    I believe you can clear the index by running:

    rm .metadata/.plugins/org.eclipse.jdt.core/*.index
    

    And then restarting Eclipse. It will then rebuild its index.

    This worked for me in a Java project, but I imagine its the same index for all (most?) project types.

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