boost : No such file or directory
-
Hello,
I'm having issue compiling a code I inherited with no documentation from a simple zip file . I'm having this error
erreor : boost/config.hpp: No such file or directory
Working on Qt5.15.2, the library boost i have installed doesn't seem to be found by Qt, even if, and all file needed are present on the boost folderAccording to the .pro the path should be desktop ? if
ROOTDIR
=C:\Users\agp\Desktop\project\
, thenINCLUDEPATH
should beC:\Users\agp\Desktop\boost
? i don't know if i am rigth, i may need help mostly on that part to understand what all of the .pro meanBut boost (from what i'v read online) is not supposed to be on desktop or anywhere close to the project, but on program files. It's possible there is something about headers but i would neither know how to make sure Qt can find them. I really don't know boost so i may not say too many foolishness about it cause i'm very not familiar with it.
.pro :
#DEFINES += NO_GRAPHVIZ INCLUDEPATH+=$$PWD #DEPENDPATH += $$PWD #include($$PWD/config/config.pri) DESTDIR = $$PWD/bin ROOTDIR = $$PWD OBJECTS_DIR = $$ROOTDIR/objects/$$TARGET INCLUDEPATH +=$$ROOTDIR/../boost/ unix:INCLUDEPATH+=/usr/include/graphviz CONFIG += c++11 QT += core widgets gui svg LIBS += -Wl,--start-group for(dep, DEPENDENCY_LIBRARIES) { LIBS += -L$$ROOTDIR/lib/ -l$${dep} PRE_TARGETDEPS += $$ROOTDIR/lib/lib$${dep}.a } LIBS += -Wl,--end-group QMAKE_CXXFLAGS += -Wno-unused-local-typedefs
full compilation error :
C:\Users\agp\Desktop\project\addons\BoostGraphAddOn.h:5: error : boost/config.hpp: No such file or directory In file included from ..\..\..\controllers\MElementFacade.cpp:33: ..\..\..\..\project/addons/BoostGraphAddOn.h:5:10: fatal error: boost/config.hpp: No such file or directory #include <boost/config.hpp> ^~~~~~~~~~~~~~~~~~
(the path of the file is desktop/boost/boost/config.hpp)
I really don't know if someone may understand my issue
But if anyone can land me some help i would be very gratfull, even if it's just to scratch the issue and give me some clue on what i am supposed to do to solve the issue
-
Hello,
I'm having issue compiling a code I inherited with no documentation from a simple zip file . I'm having this error
erreor : boost/config.hpp: No such file or directory
Working on Qt5.15.2, the library boost i have installed doesn't seem to be found by Qt, even if, and all file needed are present on the boost folderAccording to the .pro the path should be desktop ? if
ROOTDIR
=C:\Users\agp\Desktop\project\
, thenINCLUDEPATH
should beC:\Users\agp\Desktop\boost
? i don't know if i am rigth, i may need help mostly on that part to understand what all of the .pro meanBut boost (from what i'v read online) is not supposed to be on desktop or anywhere close to the project, but on program files. It's possible there is something about headers but i would neither know how to make sure Qt can find them. I really don't know boost so i may not say too many foolishness about it cause i'm very not familiar with it.
.pro :
#DEFINES += NO_GRAPHVIZ INCLUDEPATH+=$$PWD #DEPENDPATH += $$PWD #include($$PWD/config/config.pri) DESTDIR = $$PWD/bin ROOTDIR = $$PWD OBJECTS_DIR = $$ROOTDIR/objects/$$TARGET INCLUDEPATH +=$$ROOTDIR/../boost/ unix:INCLUDEPATH+=/usr/include/graphviz CONFIG += c++11 QT += core widgets gui svg LIBS += -Wl,--start-group for(dep, DEPENDENCY_LIBRARIES) { LIBS += -L$$ROOTDIR/lib/ -l$${dep} PRE_TARGETDEPS += $$ROOTDIR/lib/lib$${dep}.a } LIBS += -Wl,--end-group QMAKE_CXXFLAGS += -Wno-unused-local-typedefs
full compilation error :
C:\Users\agp\Desktop\project\addons\BoostGraphAddOn.h:5: error : boost/config.hpp: No such file or directory In file included from ..\..\..\controllers\MElementFacade.cpp:33: ..\..\..\..\project/addons/BoostGraphAddOn.h:5:10: fatal error: boost/config.hpp: No such file or directory #include <boost/config.hpp> ^~~~~~~~~~~~~~~~~~
(the path of the file is desktop/boost/boost/config.hpp)
I really don't know if someone may understand my issue
But if anyone can land me some help i would be very gratfull, even if it's just to scratch the issue and give me some clue on what i am supposed to do to solve the issue
@AntGP said in boost : No such file or directory:
INCLUDEPATH +=$$ROOTDIR/../boost/
If your include path for searching includes a directory ending in
boost
then a#include <boost/config.hpp>
will not find in the include path'sboost
directory.(the path of the file is desktop/boost/boost/config.hpp)
Though this confuses me, I guess it could work if you are looking for
boost
insideboost
. Can you temporarily get rid of theboost/boost
level, or even rename it, as that is just confusing? -
i can try it
result : i still have he issue, it did not changed the error
Now the path is C:\Users\agp\Desktop\boost\config.hpp@AntGP said in boost : No such file or directory:
Now the path is C:\Users\agp\Desktop\boost\config.hpp
Which expands to
INCLUDEPATH +=C:\Users\agp\Desktop\boost\config.hpp/../boost/
how should this even work? You pass a filename, not a directory...
-
@AntGP said in boost : No such file or directory:
Now the path is C:\Users\agp\Desktop\boost\config.hpp
Which expands to
INCLUDEPATH +=C:\Users\agp\Desktop\boost\config.hpp/../boost/
how should this even work? You pass a filename, not a directory...
@Christian-Ehrlicher No i did not said that the path i gave to the .pro was
C:\Users\agp\Desktop\boost\config.hpp
It was the real path i was trying to reach.
To clearly explain what i did, i tried to remove a layer of boost on my file going from
C:\Users\agp\Desktop\boost\boost\config.hpp
toC:\Users\agp\Desktop\boost\config.hpp
Sins it didn't worked then tired other combinaisons
Then whit the base boost/boost path to edit theINCLUDEPATH +=$$ROOTDIR/../boost/
toINCLUDEPATH +=$$ROOTDIR/../
It didn't work eitherSo i tried to combine the two whit
C:\Users\agp\Desktop\boost\config.hpp
andINCLUDEPATH +=$$ROOTDIR/../
, but it also did not worked -
@Christian-Ehrlicher No i did not said that the path i gave to the .pro was
C:\Users\agp\Desktop\boost\config.hpp
It was the real path i was trying to reach.
To clearly explain what i did, i tried to remove a layer of boost on my file going from
C:\Users\agp\Desktop\boost\boost\config.hpp
toC:\Users\agp\Desktop\boost\config.hpp
Sins it didn't worked then tired other combinaisons
Then whit the base boost/boost path to edit theINCLUDEPATH +=$$ROOTDIR/../boost/
toINCLUDEPATH +=$$ROOTDIR/../
It didn't work eitherSo i tried to combine the two whit
C:\Users\agp\Desktop\boost\config.hpp
andINCLUDEPATH +=$$ROOTDIR/../
, but it also did not worked -
g++ -c -fno-keep-inline-dllexport -Wno-unused-local-typedefs -g -std=gnu++11 -Wall -Wextra -Wextra -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_QML_DEBUG -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_XML_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I..\..\..\controllers -I. -I..\..\..\..\CORAC -IC:/Users/agp/Desktop/project/../boost/ -IE:\Qt\5.15.2\mingw81_64\include -IE:\Qt\5.15.2\mingw81_64\include\QtSvg -IE:\Qt\5.15.2\mingw81_64\include\QtWidgets -IE:\Qt\5.15.2\mingw81_64\include\QtGui -IE:\Qt\5.15.2\mingw81_64\include\QtANGLE -IE:\Qt\5.15.2\mingw81_64\include\QtXml -IE:\Qt\5.15.2\mingw81_64\include\QtQml -IE:\Qt\5.15.2\mingw81_64\include\QtNetwork -IE:\Qt\5.15.2\mingw81_64\include\QtCore -Idebug -I/include -IE:\Qt\5.15.2\mingw81_64\mkspecs\win32-g++ -o ..\..\..\objects\controllers\MElementFacade.o ..\..\..\controllers\MElementFacade.cpp g++ -c -fno-keep-inline-dllexport -Wno-unused-local-typedefs -g -std=gnu++11 -Wall -Wextra -Wextra -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_QML_DEBUG -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_XML_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I..\..\..\controllers -I. -I..\..\..\..\CORAC -IC:/Users/agp/Desktop/project/../boost/ -IE:\Qt\5.15.2\mingw81_64\include -IE:\Qt\5.15.2\mingw81_64\include\QtSvg -IE:\Qt\5.15.2\mingw81_64\include\QtWidgets -IE:\Qt\5.15.2\mingw81_64\include\QtGui -IE:\Qt\5.15.2\mingw81_64\include\QtANGLE -IE:\Qt\5.15.2\mingw81_64\include\QtXml -IE:\Qt\5.15.2\mingw81_64\include\QtQml -IE:\Qt\5.15.2\mingw81_64\include\QtNetwork -IE:\Qt\5.15.2\mingw81_64\include\QtCore -Idebug -I/include -IE:\Qt\5.15.2\mingw81_64\mkspecs\win32-g++ -o ..\..\..\objects\controllers\FileManagementIcd.o ..\..\..\controllers\FileManagementIcd.cpp
As everyone can guess i'm really a beginner whit all the Qt stuff
But i think thoose are the compilations logs with the path, or at least, it's the only log where i found any mention of boost. They are the last log before the error message that is posted on the original message of this thread.full compilation error :
C:\Users\agp\Desktop\project\addons\BoostGraphAddOn.h:5: error : boost/config.hpp: No such file or directory In file included from ..\..\..\controllers\MElementFacade.cpp:33: ..\..\..\..\project/addons/BoostGraphAddOn.h:5:10: fatal error: boost/config.hpp: No such file or directory #include <boost/config.hpp> ^~~~~~~~~~~~~~~~~~
-IC:/Users/agp/Desktop/project/../boost/
if../
mean the relative parent path, it would mean-IC:/Users/agp/Desktop/boost/
and whit the#include <boost/config.hpp>
used i can assume that it is -IC:/Users/agp/Desktop/boost/boost/config.hpp` ? -
g++ -c -fno-keep-inline-dllexport -Wno-unused-local-typedefs -g -std=gnu++11 -Wall -Wextra -Wextra -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_QML_DEBUG -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_XML_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I..\..\..\controllers -I. -I..\..\..\..\CORAC -IC:/Users/agp/Desktop/project/../boost/ -IE:\Qt\5.15.2\mingw81_64\include -IE:\Qt\5.15.2\mingw81_64\include\QtSvg -IE:\Qt\5.15.2\mingw81_64\include\QtWidgets -IE:\Qt\5.15.2\mingw81_64\include\QtGui -IE:\Qt\5.15.2\mingw81_64\include\QtANGLE -IE:\Qt\5.15.2\mingw81_64\include\QtXml -IE:\Qt\5.15.2\mingw81_64\include\QtQml -IE:\Qt\5.15.2\mingw81_64\include\QtNetwork -IE:\Qt\5.15.2\mingw81_64\include\QtCore -Idebug -I/include -IE:\Qt\5.15.2\mingw81_64\mkspecs\win32-g++ -o ..\..\..\objects\controllers\MElementFacade.o ..\..\..\controllers\MElementFacade.cpp g++ -c -fno-keep-inline-dllexport -Wno-unused-local-typedefs -g -std=gnu++11 -Wall -Wextra -Wextra -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_QML_DEBUG -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_XML_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I..\..\..\controllers -I. -I..\..\..\..\CORAC -IC:/Users/agp/Desktop/project/../boost/ -IE:\Qt\5.15.2\mingw81_64\include -IE:\Qt\5.15.2\mingw81_64\include\QtSvg -IE:\Qt\5.15.2\mingw81_64\include\QtWidgets -IE:\Qt\5.15.2\mingw81_64\include\QtGui -IE:\Qt\5.15.2\mingw81_64\include\QtANGLE -IE:\Qt\5.15.2\mingw81_64\include\QtXml -IE:\Qt\5.15.2\mingw81_64\include\QtQml -IE:\Qt\5.15.2\mingw81_64\include\QtNetwork -IE:\Qt\5.15.2\mingw81_64\include\QtCore -Idebug -I/include -IE:\Qt\5.15.2\mingw81_64\mkspecs\win32-g++ -o ..\..\..\objects\controllers\FileManagementIcd.o ..\..\..\controllers\FileManagementIcd.cpp
As everyone can guess i'm really a beginner whit all the Qt stuff
But i think thoose are the compilations logs with the path, or at least, it's the only log where i found any mention of boost. They are the last log before the error message that is posted on the original message of this thread.full compilation error :
C:\Users\agp\Desktop\project\addons\BoostGraphAddOn.h:5: error : boost/config.hpp: No such file or directory In file included from ..\..\..\controllers\MElementFacade.cpp:33: ..\..\..\..\project/addons/BoostGraphAddOn.h:5:10: fatal error: boost/config.hpp: No such file or directory #include <boost/config.hpp> ^~~~~~~~~~~~~~~~~~
-IC:/Users/agp/Desktop/project/../boost/
if../
mean the relative parent path, it would mean-IC:/Users/agp/Desktop/boost/
and whit the#include <boost/config.hpp>
used i can assume that it is -IC:/Users/agp/Desktop/boost/boost/config.hpp` ?@AntGP said in boost : No such file or directory:
IC:/Users/agp/Desktop/project/../boost/
So are your boost headers located there?
-
C:/Users/agp/Desktop/project/../boost/ mean C:/Users/agp/Desktop/boost/ ? if it's the case then yes
And so i may have broke somthing on the boost part whit all the move of location of the file, some path inside of it are broken now
The issue may have been solved a while ago, but i may have broken the library on the wayI think i will take some time to restart everything from the begining to be sure i did not miss any step, and that while trying thing nothing have been broke
-
After redoing the entier thing to install boost and using the project straigth out of the zip file, the issue appear to be that I build the library on the wrong place, then moved it at the rigth place, and then wondering why whit the files at the rigth place it was not working
Sins i have to add the path of the library to windows environment variables, moving the library borke everything
And the fact is that don't even have to move the entier library but i can just move a copy of the headers and windows will do the work by itself to link them to the rigth placeThis thread at least allowed me to to understand how are build the .pro files, and eliminate the possibility that the issue was coming from Qt
(A video that helped me a lot : https://www.youtube.com/watch?v=5afpq2TkOHc for anyone having the same issue + the info that you need to run powershell on admin mode)
-
-
After redoing the entier thing to install boost and using the project straigth out of the zip file, the issue appear to be that I build the library on the wrong place, then moved it at the rigth place, and then wondering why whit the files at the rigth place it was not working
Sins i have to add the path of the library to windows environment variables, moving the library borke everything
And the fact is that don't even have to move the entier library but i can just move a copy of the headers and windows will do the work by itself to link them to the rigth placeThis thread at least allowed me to to understand how are build the .pro files, and eliminate the possibility that the issue was coming from Qt
(A video that helped me a lot : https://www.youtube.com/watch?v=5afpq2TkOHc for anyone having the same issue + the info that you need to run powershell on admin mode)
@AntGP said in boost : No such file or directory:
Sins i have to add the path of the library to windows environment variables
Why? And what windows env variables do you mean? All you need to do is to set the INCLUDEPATH correctly (and LIBS if you also add precompiled libs).