Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Adding relative library paths in Qt Creator

Adding relative library paths in Qt Creator

Scheduled Pinned Locked Moved General and Desktop
8 Posts 2 Posters 4.6k 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.
  • Z Offline
    Z Offline
    Zamaster
    wrote on last edited by
    #1

    I'm working on a project where we are storing all of our code in a dropbox. Using the library feature (right click project in explorer, 'Add Library'), I'd like to add a relative path to the directory in our box to where we keep our libraries. Is there a way to do this? Every time I try to create a path myself in the "external library" boxes it gets red'd out. Thanks!

    1 Reply Last reply
    0
    • Z Offline
      Z Offline
      Zamaster
      wrote on last edited by
      #2

      bump... is that acceptable here?

      1 Reply Last reply
      0
      • D Offline
        D Offline
        DBoosalis
        wrote on last edited by
        #3

        I never knew of that menu till you pointed it out. Thanks. Is it that you want to run against your own library. I do that from the "Projects" tab, click on the "Run" portion of your Qt and then in the "Run Environment" I edit the LD_LIBRARY_PATH. Is this what you want ?

        1 Reply Last reply
        0
        • Z Offline
          Z Offline
          Zamaster
          wrote on last edited by
          #4

          Not my own library, in particular I'm trying to use the SOIL library with gl. I have the static .lib and the includes. These are in our shared project dropbox. I'd like to be able to reference them locally so my teammates can run my qt project on a different machine.

          1 Reply Last reply
          0
          • D Offline
            D Offline
            DBoosalis
            wrote on last edited by
            #5

            Ok , but can't they just copy over the libs, or have then in your git or svn repository

            Have something like

             libs/
            includes/
            myproject/
            

            And inside myproject you have reference to external libraries in libs.

            Guess I am not understanding the problem.

            Sorry

            1 Reply Last reply
            0
            • Z Offline
              Z Offline
              Zamaster
              wrote on last edited by
              #6

              Ah okay, best way to describe it, I'd like to define the library path like this:

              "../../Libs"

              and Qt wont let me do it, at least using the add library functionality.

              1 Reply Last reply
              0
              • D Offline
                D Offline
                DBoosalis
                wrote on last edited by
                #7

                I've always done that in the .pro file. That is directly put it in there
                @LIBS += -L../lib -lgui -ldata @

                But agree with you that QtCreator ought to be able to let you do this.

                1 Reply Last reply
                0
                • Z Offline
                  Z Offline
                  Zamaster
                  wrote on last edited by
                  #8

                  I had actually tried that and still got linker errors. I then realized maybe the version of SOIL I had wasn't compatible with my x64 tool chain: I downloaded and recompiled SOIL for a 64 bit target, then used the reference method you suggest and now I have it working!

                  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