include path added but still not able to include files
I am trying to include the folder which has my include files, I am trying to add a folder in the Build environment in the QT Creator but still I am not able to include the files, Though its very less input for somebody to explain where I am going wrong,. can anybody help me
10 replies
yes my own headers which is grouped in a different folder,. I am adding that path of that folder to build environment
INCLUDE C:/Users/Desktop/Test Workspace/Sourcecode
under that sourcecode folder my header files are present.
in my file if i just include a header which is present in that particular folder its not able to fetch ,. its says no such file or directory.
however, if i give a specific path while including say
#include “..\ Test Workspace\Sourcecode\enums.h”
It gets included I do not want to do this way because it might go to an endless loop if enums.h includes someother file and that wont be able to search ..
hope you get it
- CONFIG += designer plugin debug_and_release
- CONFIG(debug, debug|release) {
- TARGET = debug_binary
- TARGET = $$qtLibraryTarget(plugind)
- } else {
- TARGET = release_binary
- TARGET = $$qtLibraryTarget(plugin)
- }
- TEMPLATE = lib
- HEADERS = progressbar.h customplugin.h Enums.h Structs.h BaseHandler.h HandlerFactory.h
- SOURCES = progressbar.cpp customplugin.cpp
- RESOURCES = icons.qrc
- LIBS += -L.
- INCLUDEPATH += "C:\Users\998234\Desktop\CustomPlugin Workspace\AppWorkspace\Sourcecode"
- target.path = $$[QT_INSTALL_PLUGINS]/designer
- INSTALLS += target
- include(progressbar.pri)
My pro file looks like above.
By adding the INCLUDEPATH I am able to include the necessary headers required for the project
However, how should i insert an relative path there instead of
INCLUDEPATH += “C:\Users\998234\Desktop\Custom Workspace\Custom Workspace\Customapp\Sourcecode”
since I am new to scripting or the makefiles, I want to know where i can find the macros to be used like
$$qtLibraryTarget or $$[QT_INSTALL_PLUGINS]
from there i can specify the path to the required folders
You must log in to post a reply. Not a member yet? Register here!



