Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Creator not "seeing" path to boost library
Qt 6.11 is out! See what's new in the release blog

Creator not "seeing" path to boost library

Scheduled Pinned Locked Moved Qt Creator and other tools
14 Posts 3 Posters 12.1k Views 1 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.
  • mzimmersM Offline
    mzimmersM Offline
    mzimmers
    wrote on last edited by
    #1

    I'm once again preparing to dabble with boost (need a circular buffer). I installed it into C:\Program Files\boost_1_49_0. The directory "boost" lives in there. I added this to my PATH environment variable, and it appears in the build environment, but...in the editor, I still get no such file or directory. Any ideas what I might have screwed up now?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mlong
      wrote on last edited by
      #2

      You'll need to add the path and library to the LIBS variable in your .pro file, and make sure that any boost headers are pointed to by the INCLUDEPATH variable.

      Software Engineer
      My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

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

        OK...I'm about to show how little I know about boost with this question. I thought you could use only the include files if you wanted. I haven't built the libraries. Am I misinformed?

        And, so the .pro file would contain lines like:

        @LIBS += C:\Program Files\boost_1_49_0\libs
        INCLUDEPATH += C:\Program Files\boost_1_49_0
        @
        since the boost subdirectory is under the boost_1_49_0 directory, and I include "/boost" in my #include statements, I assume that's adequate.

        So...how many mistakes have I made here?

        EDIT:

        Oh, I see one already: this needs to work on multiple platforms (Mac OS X and Windows 7 64-bit). I know I need to do something like this:

        @win32:INCLUDEPATH += "C:/mylibs/extra headers"
        unix:INCLUDEPATH += "/home/user/extra headers"@

        (this is an example from the docs)

        My question is, where do the values for the prefix (like "win32" and "unix") get defined? I'll need to know that one exists for my (64-bit) platform.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mlong
          wrote on last edited by
          #4

          I'm no expert in Boost, but I would assume that if there are libraries, they would have to be built. Typically, header files only have class definitions, and C++ files have the implementations which are compiled into libraries.

          Software Engineer
          My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

          1 Reply Last reply
          0
          • A Offline
            A Offline
            andre
            wrote on last edited by
            #5

            Note that there is also a MR (by ZapB) for a QCircularBuffer. You might want to look into using that, as it sports the familiar Qt container API.

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

              An "MR?"

              And I just may use that instead, but...I'm getting pretty tired of not being able to finish things. I am going to get boost installed properly, come hell or high water.

              1 Reply Last reply
              0
              • A Offline
                A Offline
                andre
                wrote on last edited by
                #7

                Sorry, a Merge Request, a request to add or modify a piece of code in Qt itself. You can find the suggestion and the code here: http://gitorious.org/~seanharmer/qt/seanharmers-qtdoc

                Good luck with getting Boost to run! What parts of Boost are you trying to get running? Most of Boost does not need to be build; many parts are templated, header only. All you need to do is make sure qmake can find the include locations.

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

                  Well, that's what I'm working on right now. I have to fool with some qmake variables. The documentation is a bit sparse in that area.

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

                    You are looking for INCLUDEPATH += path/to/boost

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

                      Yeah, just to test, I put an unconditional INCLUDEPATH in the .pro file on my Windows machine, and Creator finds boost now (at least the .hpp files, which is good enough for me at present).

                      Now, for making this platform-independent, where can I find a list of the prefixes like "win32" and "unix"? I assume those are pre-set, since there are no definitions of them in my .pro file.

                      Thanks.

                      1 Reply Last reply
                      0
                      • A Offline
                        A Offline
                        andre
                        wrote on last edited by
                        #11

                        You expect that you can always find the library in the same place, depending only on the platform? That's rather... optimistic. There is no such standard path that I am aware of.

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

                          No, I don't expect that -- I expect just the opposite...that's why I realize the need for using those prefixes. My question is, where can I find a list of those prefixes? I want to make sure I'm choosing the right one for my Windows 7 64-bit version. Plus, I'd like to look them over.

                          1 Reply Last reply
                          0
                          • A Offline
                            A Offline
                            andre
                            wrote on last edited by
                            #13

                            I'm afraid I don't understand what prefixes you mean then, sorry.

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

                              I may be calling them the wrong thing, but the "win32:" and "unix:" tokens at the start of lines like this:

                              @win32:INCLUDEPATH += "C:/mylibs/extra headers"
                              unix:INCLUDEPATH += "/home/user/extra headers"@

                              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