How to deal with unresolved inclusion in eclipse in c++
13,570
You can set path to the header files of projectB in projectA under:
Project -> Properties -> C/C++ Build -> Settings -> Compiler -> Includes
Related videos on Youtube
Author by
user1853170
Updated on October 11, 2022Comments
-
user1853170 over 1 year
I import two self-defined project: projectA and projectB the classes in projectA include headers in project B but eclipse always show some yellow and red lines to say that unresolved inclusion. (I am sure that all the syntax and setting about include are correct, since they are projects has been developed and used for a long time) How to deal with that?
do I need to right click project and do index->rebuild or something else?
-
user1853170 over 11 yearsthere is no complier under setttings
-
AngelCastillo over 11 yearsCompiler means that you have to select your current compiler, IE GCC Compiler. I will update my answer with a picture.
-
user1853170 over 11 yearsIt seems that we use different version of eclipse, I do not have Tool Setting
-
user1853170 over 11 yearsand the configuration is Build, not Debug, and it can not be changed(in grey)
-
user1853170 over 11 yearsunder c/c++ Build->discovery Options, it says "this project is not a CDT project"
-
user1853170 over 11 yearsis that a problem??? What I did to import the projects is that import->General->existing projects into workspace
-
AngelCastillo over 11 yearsWhich verison of eclipse are you using? I have Juno, you can find the last Eclipse CDT here eclipse.org/cdt. If it says that "this project is not a CDT project" maybe the .cproject file is missing. In that case the .project file still marks the project to be C/C++ but the actual C settings can't be loaded.