[SOLVED] I get an IDE warnings such as "cstring: no such file or directory" but the project compiles just fine. Also, complete does not work. Qt Crea
-
Hello,
I use QtCreator 2.4.1 on Ubuntu, C++ projects with my own makefiles.
I've suddenly started getting the warnings such as "cstring: no such file or directory" on the line #include<cstring>. I get such warnings on every single #include line in every header file. These are IDE warnings as my #include lines are underscored but compiler does not give any warnings. So the projects are compiled and build just fine but the warnings are plain annoying.
Could someone help me with this? TIA!
-
You are using your own Makefiles as in a "generic project"? If so then Creator will not pick up include pathes from the project and you need to pass them via one of the files we provide when opening the project for the first time.
Creator will pick up default pathes from the compiler you selected (Project->Build Settings->Tool chain), so make sure you have the correct one there.
I hope this help.
-
Right, I am using my own Makefiles with make not qmake. I created my own *.pro files. Complete works for my own classes but not for the C++ classes.
There is Options->Build and run->Tool Chain - it correctly auto detected g++ and path to it.
Where do I set the path to include files?
-
You can set include pathes in your .pro-file.
The default compiler include pathes are extracted by Creator from gcc by running "COMPILERPATH -xc++ -E -v -".
-
How do I set include paths in the *.pro file? I cannot find the syntax in the documentation. My *.pro file looks like this:
@
TEMPLATE = app
CONFIG += console
CONFIG -= qtSOURCES +=
tcpsocket.cpp
helper.cpp
order.cpp
fix44.cppHEADERS +=
tcpsocket.h
helper.h
order.h
fix44.h
@[Edit: Wrapped in @ tags to preserve formatting. -mlong]
-
Try
@
INCLUDEPATH += some/dir some/other/dir
@