Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Linked library not found at compilation.

    3rd Party Software
    2
    3
    5973
    Loading More Posts
    • 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
      aureshinite last edited by

      Hi, I have a project where the structure is basically:

      root
      --myprojects
      ----project1
      ----...
      ----projectn
      --3rdparty
      ----party1
      ------include -> headers only
      ------lib ->ddl, .a lib
      ----party2
      ------party2.pro -> compilable project

      Inside project1.pro, I want to include qwt. so I have something like :

      @
      QWT_PROJECT_DIR = $${TOOLBOX_ROOT}/$${QWT_DIR}

      INCLUDEPATH += $${QWT_PROJECT_DIR}/include/

      win32{
      win32-g++{
      LIBS += -L$${QWT_PROJECT_DIR}/lib/ -lqwtd5
      }
      else{
      #MSVC
      LIBS += $${QWT_PROJECT_DIR}/lib/qwtd5.lib
      }
      }
      else{
      LIBS += -L$${QWT_PROJECT_DIR}/lib/ -lqwtd5
      }
      @

      On one side I can find the h. files, meaning that they are well resolved but on the other side,
      I got a "cannot find -lqwtd5"

      Do somebody know why is that??
      In general, I want to be able to compile each one of my projects without copying the libraries everywhere.

      1 Reply Last reply Reply Quote 0
      • A
        aureshinite last edited by

        Never mind, found the solution.
        For some reasons, when adding a new lib directory with LIBS +=, you need
        to insert the complete path while INCLUDEPATH work with relative paths as ../../include

        1 Reply Last reply Reply Quote 0
        • A
          andre last edited by

          INCLUDEPATH, as "documented":http://doc.qt.nokia.com/4.7/qmake-variable-reference.html#includepath, is for including header files. I think you were looking for VPATH and/or DEPENDPATH.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post