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. QT Creator "subdirs" project gui & projects libs

QT Creator "subdirs" project gui & projects libs

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
4 Posts 3 Posters 630 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.
  • C Offline
    C Offline
    Claudio Silva
    wrote on last edited by
    #1

    Re: QT Creator "subdirs" project

    Hi everyone, I have a very good question, how can I make the .lib link in the gui project?

    https://drive.google.com/open?id=1tG0hYCo8WBYBCAwC-ts_PAQUH8DObmsU

    C 1 Reply Last reply
    0
    • C Claudio Silva

      Re: QT Creator "subdirs" project

      Hi everyone, I have a very good question, how can I make the .lib link in the gui project?

      https://drive.google.com/open?id=1tG0hYCo8WBYBCAwC-ts_PAQUH8DObmsU

      C Offline
      C Offline
      Claudio Silva
      wrote on last edited by
      #2

      @Claudio-Silva
      the solution to import .lib into a project and use $$OUT_PWD

      INCLUDEPATH += ../lib
      INCLUDEPATH += ../lib2
      LIBS += $$OUT_PWD/../lib/release/lib.lib
      LIBS += $$OUT_PWD/../lib2/release/lib2.lib
      
      aha_1980A kshegunovK 2 Replies Last reply
      1
      • C Claudio Silva

        @Claudio-Silva
        the solution to import .lib into a project and use $$OUT_PWD

        INCLUDEPATH += ../lib
        INCLUDEPATH += ../lib2
        LIBS += $$OUT_PWD/../lib/release/lib.lib
        LIBS += $$OUT_PWD/../lib2/release/lib2.lib
        
        aha_1980A Offline
        aha_1980A Offline
        aha_1980
        Lifetime Qt Champion
        wrote on last edited by
        #3

        @Claudio-Silva

        There might be a better way, more cross platform. Given your libraries are called libOne.lib and libTwo.lib, the lines would look like this:

        LIBS += -L$$OUT_PWD/../lib/release -lOne
        LIBS += -L$$OUT_PWD/../lib2/release -lTwo
        

        The advantage here is (for shared libraries, you had static ones in your project), that QtCreator automatically extends the library search path when you run your app so it will find all libs.

        Regards

        Qt has to stay free or it will die.

        1 Reply Last reply
        1
        • C Claudio Silva

          @Claudio-Silva
          the solution to import .lib into a project and use $$OUT_PWD

          INCLUDEPATH += ../lib
          INCLUDEPATH += ../lib2
          LIBS += $$OUT_PWD/../lib/release/lib.lib
          LIBS += $$OUT_PWD/../lib2/release/lib2.lib
          
          kshegunovK Offline
          kshegunovK Offline
          kshegunov
          Moderators
          wrote on last edited by
          #4

          In addition you may want to add them to PRE_TARGETDEPS.

          Read and abide by the 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