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. How to install Boost library? How to add library to project?
Forum Updated to NodeBB v4.3 + New Features

How to install Boost library? How to add library to project?

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
50 Posts 3 Posters 10.6k Views 2 Watching
  • 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #27

    See the environment block ? That's what you need to change.

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    0
    • A Offline
      A Offline
      aret777
      wrote on last edited by aret777
      #28

      Humm, I already have this variable and it doesnt permit set another one (LD_LIBRARY_PATH)
      I tried to set variable in analogue with others... but it changed nothing in compiler errors.
      Screenshot_2.png

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #29

        The error you show is a run time error not a compiler error.

        Where exactly is that library located ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        mzimmersM 1 Reply Last reply
        0
        • SGaistS SGaist

          The error you show is a run time error not a compiler error.

          Where exactly is that library located ?

          mzimmersM Offline
          mzimmersM Offline
          mzimmers
          wrote on last edited by
          #30

          @SGaist according to the console read-out in the first post, it appears that library is located at: /home/user/Documents/BoostLibrary/stage/lib, which is indeed part of the definition of LD_LIBRARY_PATH.

          SGaistS 1 Reply Last reply
          0
          • mzimmersM mzimmers

            @SGaist according to the console read-out in the first post, it appears that library is located at: /home/user/Documents/BoostLibrary/stage/lib, which is indeed part of the definition of LD_LIBRARY_PATH.

            SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #31

            @mzimmers good point, I have misread that part.

            Second thing I would do is run ldd to see what it has to say and the first would be to switch to the distribution provided boost if recent enough.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            mzimmersM 1 Reply Last reply
            0
            • SGaistS SGaist

              @mzimmers good point, I have misread that part.

              Second thing I would do is run ldd to see what it has to say and the first would be to switch to the distribution provided boost if recent enough.

              mzimmersM Offline
              mzimmersM Offline
              mzimmers
              wrote on last edited by
              #32

              @SGaist agreed, but (IMO) it's still worth knowing why this isn't working for him. At this point, it seems like he's done everything necessary.

              BTW: when did Linux distros begin including Boost?

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #33

                The exact debut, I don't know but at least Debian does.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  aret777
                  wrote on last edited by
                  #34

                  Okay, here is the my ldd commands - I dont know why it wont work
                  Screenshot_3.png

                  Anyway, I can deinstall Boost if needed. I downloaded from Boost site the «boost_1_81_0.tar.gz» archive, it still on my download folder.

                  mzimmersM 1 Reply Last reply
                  0
                  • A aret777

                    Okay, here is the my ldd commands - I dont know why it wont work
                    Screenshot_3.png

                    Anyway, I can deinstall Boost if needed. I downloaded from Boost site the «boost_1_81_0.tar.gz» archive, it still on my download folder.

                    mzimmersM Offline
                    mzimmersM Offline
                    mzimmers
                    wrote on last edited by
                    #35

                    @aret777 I believe you want to run ldd on your executable, to see what dependencies it has. You appear to be running it in the boost directories.

                    A 1 Reply Last reply
                    0
                    • mzimmersM mzimmers

                      @aret777 I believe you want to run ldd on your executable, to see what dependencies it has. You appear to be running it in the boost directories.

                      A Offline
                      A Offline
                      aret777
                      wrote on last edited by
                      #36

                      @mzimmers what executable? Of a QT project? It doesnt build.

                      mzimmersM 1 Reply Last reply
                      0
                      • A aret777

                        @mzimmers what executable? Of a QT project? It doesnt build.

                        mzimmersM Offline
                        mzimmersM Offline
                        mzimmers
                        wrote on last edited by
                        #37

                        @aret777 yes it does build - that's what SGaist was trying to tell you. If you look in your build directory, under debug or release or whatever build mode you're using, you should find an executable. Run ldd on that file.

                        1 Reply Last reply
                        0
                        • A Offline
                          A Offline
                          aret777
                          wrote on last edited by
                          #38

                          Screenshot_4.png
                          Emmm, I dont see any folder.

                          1 Reply Last reply
                          0
                          • mzimmersM Offline
                            mzimmersM Offline
                            mzimmers
                            wrote on last edited by
                            #39

                            in user/Documents, is there a folder with a really long name starting with "build?"

                            1 Reply Last reply
                            0
                            • A Offline
                              A Offline
                              aret777
                              wrote on last edited by
                              #40

                              Here

                              user@user-X542URR:~/Documents/build-Testing-Desktop_Qt_6_4_1_GCC_64bit-Debug$ ldd Testing
                              	linux-vdso.so.1 (0x00007ffed6fc7000)
                              	libboost_program_options.so.1.81.0 => not found
                              	libQt6Widgets.so.6 => /home/user/Qt/6.4.1/gcc_64/lib/libQt6Widgets.so.6 (0x00007f531a924000)
                              	libQt6Core.so.6 => /home/user/Qt/6.4.1/gcc_64/lib/libQt6Core.so.6 (0x00007f531a2a6000)
                              	libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f531a07c000)
                              	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f531a05c000)
                              	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5319e32000)
                              	libQt6Gui.so.6 => /home/user/Qt/6.4.1/gcc_64/lib/libQt6Gui.so.6 (0x00007f5319492000)
                              	libGL.so.1 => /lib/x86_64-linux-gnu/libGL.so.1 (0x00007f531940b000)
                              	libxkbcommon.so.0 => /lib/x86_64-linux-gnu/libxkbcommon.so.0 (0x00007f53193c4000)
                              	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f53193bf000)
                              	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f53192d8000)
                              	libicui18n.so.56 => /home/user/Qt/6.4.1/gcc_64/lib/libicui18n.so.56 (0x00007f5318e00000)
                              	libicuuc.so.56 => /home/user/Qt/6.4.1/gcc_64/lib/libicuuc.so.56 (0x00007f5318a00000)
                              	libicudata.so.56 => /home/user/Qt/6.4.1/gcc_64/lib/libicudata.so.56 (0x00007f5317000000)
                              	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f53192d1000)
                              	libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f5316ec6000)
                              	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f53192b5000)
                              	libgthread-2.0.so.0 => /lib/x86_64-linux-gnu/libgthread-2.0.so.0 (0x00007f53192ae000)
                              	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f53192a9000)
                              	/lib64/ld-linux-x86-64.so.2 (0x00007f531b08d000)
                              	libEGL.so.1 => /lib/x86_64-linux-gnu/libEGL.so.1 (0x00007f5318ded000)
                              	libfontconfig.so.1 => /lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007f5316e7c000)
                              	libX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x00007f5316d3c000)
                              	libQt6DBus.so.6 => /home/user/Qt/6.4.1/gcc_64/lib/libQt6DBus.so.6 (0x00007f5316c78000)
                              	libfreetype.so.6 => /lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f5316bb0000)
                              	libGLdispatch.so.0 => /lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007f5316af8000)
                              	libGLX.so.0 => /lib/x86_64-linux-gnu/libGLX.so.0 (0x00007f5318db9000)
                              	libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f5316a82000)
                              	libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f5316a51000)
                              	libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f531929c000)
                              	libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f5316a27000)
                              	libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007f53169d9000)
                              	libpng16.so.16 => /lib/x86_64-linux-gnu/libpng16.so.16 (0x00007f531699e000)
                              	libbrotlidec.so.1 => /lib/x86_64-linux-gnu/libbrotlidec.so.1 (0x00007f53189f2000)
                              	libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x00007f53189ec000)
                              	libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f53189e4000)
                              	libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007f53168d7000)
                              	libbrotlicommon.so.1 => /lib/x86_64-linux-gnu/libbrotlicommon.so.1 (0x00007f53168b4000)
                              	libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f531689c000)
                              	liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f531686f000)
                              	libzstd.so.1 => /lib/x86_64-linux-gnu/libzstd.so.1 (0x00007f53167a0000)
                              	liblz4.so.1 => /lib/x86_64-linux-gnu/liblz4.so.1 (0x00007f5316780000)
                              	libcap.so.2 => /lib/x86_64-linux-gnu/libcap.so.2 (0x00007f5316775000)
                              	libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007f5316637000)
                              	libmd.so.0 => /lib/x86_64-linux-gnu/libmd.so.0 (0x00007f531662a000)
                              	libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007f5316602000)
                              
                              1 Reply Last reply
                              0
                              • mzimmersM Offline
                                mzimmersM Offline
                                mzimmers
                                wrote on last edited by
                                #41

                                @aret777 said in How to install Boost library? How to add library to project?:

                                libboost_program_options.so.1.81.0 => not found

                                There's the culprit. Again, I'm a little out of my depth on this, but it appears as though you need to furnish a path to this library.

                                1 Reply Last reply
                                0
                                • SGaistS Offline
                                  SGaistS Offline
                                  SGaist
                                  Lifetime Qt Champion
                                  wrote on last edited by
                                  #42

                                  Run ldd again with LD_LIBRARY_PATH updated to contain the path to the boost libraries.

                                  Interested in AI ? www.idiap.ch
                                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                  mzimmersM 1 Reply Last reply
                                  0
                                  • SGaistS SGaist

                                    Run ldd again with LD_LIBRARY_PATH updated to contain the path to the boost libraries.

                                    mzimmersM Offline
                                    mzimmersM Offline
                                    mzimmers
                                    wrote on last edited by
                                    #43

                                    @SGaist if he's updated LD_LIBRARY_PATH within Creator, will the terminal in Creator pick up that addition, or does he need to modify LD_LIBRARY_PATH in the shell?

                                    1 Reply Last reply
                                    0
                                    • SGaistS Offline
                                      SGaistS Offline
                                      SGaist
                                      Lifetime Qt Champion
                                      wrote on last edited by
                                      #44

                                      @mzimmers Which shell are you referring to ?

                                      Interested in AI ? www.idiap.ch
                                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                      mzimmersM 1 Reply Last reply
                                      0
                                      • SGaistS SGaist

                                        @mzimmers Which shell are you referring to ?

                                        mzimmersM Offline
                                        mzimmersM Offline
                                        mzimmers
                                        wrote on last edited by
                                        #45

                                        @SGaist well, what I meant was, if he's modifying LD_LIBRARY_PATH in the run configuration, that change won't be reflected if he opens up a terminal window and runs ldd, will it?

                                        SGaistS 1 Reply Last reply
                                        0
                                        • mzimmersM mzimmers

                                          @SGaist well, what I meant was, if he's modifying LD_LIBRARY_PATH in the run configuration, that change won't be reflected if he opens up a terminal window and runs ldd, will it?

                                          SGaistS Offline
                                          SGaistS Offline
                                          SGaist
                                          Lifetime Qt Champion
                                          wrote on last edited by
                                          #46

                                          @mzimmers correct, that's why I am asking to redo it with LD_LIBRARY_PATH modified.

                                          Interested in AI ? www.idiap.ch
                                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                          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