Eclipse Indigo CDT: Function could not be resolved

前端 未结 5 1392
渐次进展
渐次进展 2021-02-05 06:26

This feels silly, but its been 2 days...somewhere after upgrading from Ubuntu 10.04 to 10.11 and from Eclipse Helios to Eclipse Indigo, I got stuck with the following problem:

相关标签:
5条回答
  • 2021-02-05 06:41

    That looks like a problem that many others have had with eclipse CDT before. Sometimes shutting eclipse down and then starting it back up again is enough to help. If that isn't the case, take a look at what I have below:

    Compilation ok, but eclipse content assist having problems

    0 讨论(0)
  • 2021-02-05 06:43

    Check your includes: if you're using include<math.h> change it to include<cmath>. The same for stdio.h and stdlib.h, you should replace by cstdio and cstdlib. Another option may be change you project to a C project instead of a C++.

    0 讨论(0)
  • 2021-02-05 06:57

    For me, it was solved by adding a specific ‘Source Location’ folder, and removing the default. In Luna, it is under:

    Project > Properties > C/C++ General > Paths and Symbols > Source Location

    0 讨论(0)
  • 2021-02-05 07:03

    I have experienced similar problems of the CDT reporting errors even though the code compiled fine within Eclipse Indigo.

    Project > Properties > Settings > Binary Parsers > "GNU Elf Parser"

    helped in my case. I had the "Elf Parser" checked.

    0 讨论(0)
  • 2021-02-05 07:04

    You are missing -lm option in your build preferences. Project->Properties->Settings->Miscleanous->Other (linker) flags[]

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