Indexer is apparently broken, SS3 on Arch.
I have tried rebuilding it, refresh all files and using project specific settings as per this thread:
Installation was compiling plain file just fine, until I actually started coding. Still compiles but annoying little syntax errors for no reason. It will not recognise FILE, NULL or bool (and yes I have included stdbool.h)
I have tried toggling the options six ways from Sunday and tbh I'm kinda fed up with CDT.
Is there a way to install a different parser?
Thanks in advance!
Is there a way to install a different parser?
Update to SS4?
SSv4 uses the same basic indexer as SSv3 so I don't know that switchin to Simplicity Studio v4 would help. I do not know of a way to replace the CDT indexer / parser. It does seem like the indexer doesn't recognize that an include file using <> instead of "" should be found in the toolchain. Using Simplicity Studio v3, I manually added include paths for the toolchain include path and then rebuild the index and searched for unresolved includes and it resolved everything for me (including stdbool.h).
I hope this helps you out.
Thanks @jpitt, but my includes are resolved and I have those paths added to my includes section. As well as 'include-fixed'. Attached is a screenshot of my include folders within my project and from the compiler settings.
I just tried this option:
Which basically states to disable the 'Allow heuristic resolution of includes' option in the workspace settings for the indexer. It also states to use 'active build configuration'.
I then rebuilt the index with no change.
I'm going to attempt a series of solutions from here:
Both state to delete/clear the indexer in several ways:
If your indexer is stuck and it hangs for infinite time, you can delete the indexer related files of your project from .metadata. Make sure eclipse is not running in the meanwhile.
The .metadata directory is located as a hidden folder in the path of your workspace.
There you can navigate to:
<workspace_path>/.metadata/.plugins/org. eclipse. core. runtime/.settings/
Inside the .settings/ directory there are . prefs files which store the preferences of each project individually.
For example: org .eclipse .cdt. core. prj-test-project .prefs stores the preferences of the project test-project
Open this file with the text editor and remove all the lines starting with indexer. This will reset the indexer settings for this specific project to the default.
Alternatively, you can remove all the remove all the lines starting with indexer from org .eclipse .cdt .core .prefs; doing this will reset the indexer settings for the whole workspace.
Another brute-force way is to close Eclipse, open your workspace directory and go to ".metadata\.plugins\org .eclipse .cdt .core" and delete everything in there.
This finally helps if "Freshen all Files" and friends didn't work.
delete only the .pdom file under .metadata.plugins\org .eclipse .cdt .core helps, I got the indexer screwed after upgrading Neon.2 to Neon.3 and this seems to solve the problem. (this comment already exists above but am not allowed to confirm it up there).
Neither of the above worked for me (Eclipse Indigo), index still broken and refusing to rebuild properly. Until applied this one:
The crucial bit of the linked post is this:
Eclipse no longer treats your project as a C++ project. Choose menu File/New/Convert to a C/C++ project. It takes a while to index the source code.
I will attempt those and report back.
I have tried all of the above options.. exhaustively.
For anyone who stumbles across this and happens to have the same issue, org.eclipse.cdt.core.prefs is actually inside org.eclipse.cdt.core i.e. not in the plugins folder with all of the other org.* files. As illustrated below:
Anyway, I have exhausted all of my options bar one: uninstall, rebuild, re-install.
If that doesn't work I will just ignore the errors for now, finish my current project and move to a command-line tool-chain like a big boy. Probably should do that anyway
[SOLVED] Nuked everything including /opt/SimplicityStudio, the tmp packer and the workspace folders. Rebuilt, re-installed and everything works as expected.
A number of possibilities could have caused this issue:
1. Simply, a bonked installation build
2. Installing lib32-qt4 after the initial build meant something was left out by the build (
3. Installing lib32-xulrunner after the initial build meant a similar outcome. Although not sure if it was ever necessary to explicitly install this to my system, as I've never had to with this package.
Either way, it was royally bonked. It was doing other weird things as well like gcc was calling make every single time I compiled, despite literally nothing having been changed in main.c
I should have concluded #2 at first glance as I had rebuilt and installed prior to realising lib32-qt4 was an unlisted dependency.
Thanks again @jpitt