Unsolved External Header files not found in Qt Creator 2.7.0 (Qt 5.0.2, 32 bit)
-
Well, infact that all worked on my project, regardless of the direction of the slash.
What happens if you use the following:
@HEADERS += mainwindow.h
E:/prdir/empty.h@Since it is not working, it does seem you may have a strange issue... but see if that absolute path at least works...
-
The next thing to look at is the compile out put. In the "Compile Output" window can you print out the .cpp file compile, it should look something like (where the bold is the include paths):
g++ -c -pipe -fno-keep-inline-dllexport -Wall -Wno-unused-parameter -Xlinker -Map=mvp.map -g -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_MULTIMEDIA_LIB -DQT_GUI_LIB -DQT_XML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -I. -I'config' -I'lib' -I'managers' -I'mvp' -I'smCmce' -I'smCtl' -I'smMm' -I'utils' -I'../../../Qt/Qt5.0.2/5.0.2/mingw47_32/include' -I'../../../Qt/Qt5.0.2/5.0.2/mingw47_32/include/QtMultimedia' -I'../../../Qt/Qt5.0.2/5.0.2/mingw47_32/include/QtGui' -I'../../../Qt/Qt5.0.2/5.0.2/mingw47_32/include/QtXml' -I'../../../Qt/Qt5.0.2/5.0.2/mingw47_32/include/QtNetwork' -I'../../../Qt/Qt5.0.2/5.0.2/mingw47_32/include/QtCore' -I'../_out' -I'../../../Qt/Qt5.0.2/5.0.2/mingw47_32/mkspecs/win32-g++' -o ../_out/cconfigxml.o config/cconfigxml.cpp
-
You are right,
There is no mention of the required includefolder paths in the detailed build output.Any suggestions, why so? some bug?
-
Not sure about what can cause it. But here is a few things to try:
In your .pro file try to add the path manually with the QMAKE_CXXFLAGS variable. Also keep your INCLUDEPATH += E:\prdir as well, so somthing like:
@
INCLUDEPATH += E:\prdir
QMAKE_CXXFLAGS += -I'E:\prdir'This will print the two variables out and you can see what is in them...
message (INCLUDEPATH: $$INCLUDEPATH)
message (QMAKE_CXXFLAGS: $$QMAKE_CXXFLAGS)
@This will test if the vars are getting populated correctly. Also will test if the QMAKE_CXXFLAGS var works or if that also has a problem. It might lead to more clues...
-
I had qt reinstalled, and now it does not look at changes in .pro file.
Anyway to remove qt 100% and reinstall?
Ill try on a diff system and see. -
:o
It does sound like you have some strange issue... probably you are right to try it on a different PC, we could be looking at this for a while otherwise :)
-
Sorry for replying late, I'll just input my understanding here.
The problem is most probably that at fails to run qmake every time, so try qmake manually when ever making changes in .pro file.
It seems a bug, but at least we know it. -
late reply?....that was like 6 months ago, lol ;)
To be honest, I have since come across various installs on Qt on different peoples PCs. The safest way is to install fresh (remove old installs first) and install using the SDK. Personally I have no issues with auto .pro file updating, but I see colleagues who have installed qt in "bits" who do. There is something (not figured out what yet) that controls the qmake (and other) processes.
But, running qmake manually is a valid alternative, thanks for that :)
-
:) yep, sorry again for late late reply.
The problem didn't get solved then, but after few month. So I just related incase any one gets stuck!I am also planning to make a simple custom version control and folder sync and Qt has this directory watch api's, just hope it works well when there are some issues in their own ide , but those two maybe unrelated :)
-
So What was the solution ? I'm frustrated
-
Use CMake instead of qmake. This is not as straightforward as it it should but it worked for me after hours of frustration.
The library I wanted to link in was Fruit. It has CMakeLists.txt file which means it supports CMake without needing to build it first outside the project. Actually, trying to build it outside the project, and linking it, like so:set(FRUIT_DIR "../path/to/fruit_build") include_directories(${FRUIT_DIR}/include) library_directories(${FRUIT_DIR}/lib)
still didn't find the headers for fruit.
This is how it worked:add_subdirectory("../path/to/fruit_source" "../build_dest") include_directories("../path/to/fruit_source/include")