Linked library not found at compilation.

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

    ------include -> headers only
    ------lib ->ddl, .a lib
    ----party2 -> compilable project

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



    LIBS += -L$${QWT_PROJECT_DIR}/lib/ -lqwtd5
    LIBS += $${QWT_PROJECT_DIR}/lib/qwtd5.lib
    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.

  • 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

  • INCLUDEPATH, as "documented":, is for including header files. I think you were looking for VPATH and/or DEPENDPATH.

Log in to reply