Qt Creator Not Correctly Parsing Includes
-
I am attempting to import a non-qt project using the "Import Existing Project" dialog. The project imports fine and compiles/runs with no issue. However, every single include is highlighted in red and shows a file not found error. Additionally, "Follow Symbol Under Cursor" does not work. It seems that Qt Creator is having trouble parsing the project, but I cannot figure out how to correct the issue.
-
Hi and welcome to the forum.
Did it create a .pro file from "Import Existing Project" ?
If yes, Could you show it here ?Im wondering if it needs some folder for the INCLUDEPATH
like
INCLUDEPATH = c:/msdev/include d:/stl/include
or something like that ?
Its hard to guess at with know idea about project structure and subfolders :)However, it sounds odd it compiles and runs but all includes are red.
-
-
@nlfortier
Ok, i though it would. ignore that then.
Maybe its the code model that is acting up ?
Could try disable it for a moment ?
menu: Help->About Plugins then
and restart creator. then open and see if includes are still red.
-
@nlfortier you need to properly set up the include paths in
.includes
and add predefined macros to.config
Then it will work fine, probably even with Clang. I use it everyday in many projects.
-
@aha_1980 I have set up the .includes file and all directories containing the header files have been added, but the issues still persists. It cannot seem to find any included header files unless they are in the same directory as the source file.
-
@nlfortier ah, yes! I think you dont need the full path, but add a line with . which means current directory.
a bit annoying, but it works...