Community
Participate
Working Groups
Build Identifier: 20110916-0149 Code compiles OK from command line, but hundreds of Code Analysis problems are reported by Eclipse. This happens occasionally, but I'm not sure what's causing it. Reproducible: Didn't try Steps to Reproduce: 1. Import a C++ project from existing code with a makefile 2. Code might compile fine both in Eclipse and under command line. Code is under version control 3. Unknown event occurs (try compiling different projects assigned to their own sets, switching between sets etc) 4. Code still compiles from command line, but in Eclipse, hundreds of code analysis errors will be shown. Doing a clean build does not help either. Rebuilding the index, followed by a clean build seems to fix it.
Actually, opening a source file after a build (and re-indexing) would cause the code analysis errors to come back.
After some investigating, I found out that Eclipse "forgot" the include paths (such as /usr/include etc). Deleting the project and importing it again using the "From existing code with make file" wizard did not fix the problem. I think the wizard should parse the make file and extract all -I -i paths and import them in the project. Manually adding the folders in the project and rebuilding the index still resulted in errors.
Most likely the compiler inspection did not work. Try to configure it in the project properties under 'C/C++ Build - Discovery options'.