Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. boost : No such file or directory
Forum Updated to NodeBB v4.3 + New Features

boost : No such file or directory

Scheduled Pinned Locked Moved Solved Installation and Deployment
12 Posts 4 Posters 1.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AntGP
    wrote last edited by AntGP
    #1

    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 folder

    According to the .pro the path should be desktop ? if ROOTDIR = C:\Users\agp\Desktop\project\, then INCLUDEPATH should be C:\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 mean

    But 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

    JonBJ 1 Reply Last reply
    0
    • A AntGP

      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 folder

      According to the .pro the path should be desktop ? if ROOTDIR = C:\Users\agp\Desktop\project\, then INCLUDEPATH should be C:\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 mean

      But 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

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote last edited by JonB
      #2

      @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's boost 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 inside boost. Can you temporarily get rid of the boost/boost level, or even rename it, as that is just confusing?

      1 Reply Last reply
      1
      • A Offline
        A Offline
        AntGP
        wrote last edited by
        #3

        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

        Christian EhrlicherC 1 Reply Last reply
        0
        • A AntGP

          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

          Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote last edited by
          #4

          @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...

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          A 1 Reply Last reply
          1
          • Christian EhrlicherC Christian Ehrlicher

            @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...

            A Offline
            A Offline
            AntGP
            wrote last edited by AntGP
            #5

            @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
            to C:\Users\agp\Desktop\boost\config.hpp
            Sins it didn't worked then tired other combinaisons
            Then whit the base boost/boost path to edit the INCLUDEPATH +=$$ROOTDIR/../boost/ to INCLUDEPATH +=$$ROOTDIR/../
            It didn't work either

            So i tried to combine the two whit C:\Users\agp\Desktop\boost\config.hpp and INCLUDEPATH +=$$ROOTDIR/../, but it also did not worked

            jsulmJ 1 Reply Last reply
            0
            • A AntGP

              @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
              to C:\Users\agp\Desktop\boost\config.hpp
              Sins it didn't worked then tired other combinaisons
              Then whit the base boost/boost path to edit the INCLUDEPATH +=$$ROOTDIR/../boost/ to INCLUDEPATH +=$$ROOTDIR/../
              It didn't work either

              So i tried to combine the two whit C:\Users\agp\Desktop\boost\config.hpp and INCLUDEPATH +=$$ROOTDIR/../, but it also did not worked

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote last edited by
              #6

              @AntGP Please check the build log to see which include paths are passed to the compiler and check these paths to make sure they are correct..

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • A Offline
                A Offline
                AntGP
                wrote last edited by AntGP
                #7
                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` ?

                Christian EhrlicherC 1 Reply Last reply
                0
                • A AntGP
                  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` ?

                  Christian EhrlicherC Offline
                  Christian EhrlicherC Offline
                  Christian Ehrlicher
                  Lifetime Qt Champion
                  wrote last edited by Christian Ehrlicher
                  #8

                  @AntGP said in boost : No such file or directory:

                  IC:/Users/agp/Desktop/project/../boost/

                  So are your boost headers located there?

                  Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                  Visit the Qt Academy at https://academy.qt.io/catalog

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    AntGP
                    wrote last edited by
                    #9

                    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 way

                    I 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

                    1 Reply Last reply
                    0
                    • A Offline
                      A Offline
                      AntGP
                      wrote last edited by AntGP
                      #10

                      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 place

                      This 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)

                      jsulmJ 1 Reply Last reply
                      0
                      • A AntGP has marked this topic as solved
                      • A AntGP

                        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 place

                        This 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)

                        jsulmJ Offline
                        jsulmJ Offline
                        jsulm
                        Lifetime Qt Champion
                        wrote last edited by
                        #11

                        @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).

                        https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply
                        0
                        • A Offline
                          A Offline
                          AntGP
                          wrote last edited by AntGP
                          #12

                          idk, i did that on the same configuration as before, and it worked :/
                          I did not understood why it did not worked (reason why i made this post)
                          Now i don't understand what i did to make it work

                          1 Reply Last reply
                          0

                          • Login

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • Users
                          • Groups
                          • Search
                          • Get Qt Extensions
                          • Unsolved