I have some c++ code using CImg and Eigen libraries. At the c++ code I define a plugin like this
#define cimg_plugin1 "my_plugin.h"
#include "CImg.h"
The plugin contains many method definitions that are used at the c++ code.
I also have a makefile that when called from the command line (./make), allows me to compile everything, and generates an executable.
I want to import this code into a new Eclipse project, and I do it so:
NewProjectC++ projectmakefile projectempty project
unmark "Use default location", and select the folder containing my code at the filesystem
ProjectpropertiesC/C++ Buildunmark "Use default build command" and set it to use my makefile
Also in project propertiesC/C++ GeneralPaths and SymbolsAdd paths to folders containing Eigen and CImg
Rebuild index
Clean project
Restart eclipse
When I build the project, eclipse tells me I have more than 1000 errors in "my_plugin.h", but it is capable to generate the executable. Even though, I would like to get rid of this errors, because they are annoying. Also, if I want to open the declaration of CImg methods used at the plugin, I can't.
I know it has been asked before, but any of the solutions I found were satisfactory for me (most of them enumerated at the previous list).
The sources I visited are the following, and I would be really happy if you find and tell me others I didn't see.
Eclipse shows errors but project compile fine
eclipse C project shows errors (Symbol could not be resolved) but it compiles
Eclipse CDT shows some errors, but the project is successfully built
http://www.eclipse.org/forums/index.php/t/247954/