Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. Linked library not found at compilation.
QtWS25 Last Chance

Linked library not found at compilation.

Scheduled Pinned Locked Moved 3rd Party Software
3 Posts 2 Posters 6.3k 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.
  • A Offline
    A Offline
    aureshinite
    wrote on 6 Apr 2011, 21:27 last edited by
    #1

    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
    0
    • A Offline
      A Offline
      aureshinite
      wrote on 6 Apr 2011, 21:56 last edited by
      #2

      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
      0
      • A Offline
        A Offline
        andre
        wrote on 7 Apr 2011, 08:16 last edited by
        #3

        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
        0

        1/3

        6 Apr 2011, 21:27

        • Login

        • Login or register to search.
        1 out of 3
        • First post
          1/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved