Important: Please read the Qt Code of Conduct -

Add Library Wizard produces weird output

  • Hi all,

    I am using the Qt Creator on Window 10, Qt 5.6, msvc2015, and I wonder if this is correct:

    When I add a library to the pro file via the "Add Library" wizard, the path of library is weird when different harddisk drives are used, e. g. the library is on drive C:/..., but the project is on drive D:/...

    The output in the pro file is

    win32: LIBS += -L$$PWD/C:/Test/Example/lib/ -lexampleLib
    INCLUDEPATH += $$PWD/C:/Test/Example/include
    DEPENDPATH += $$PWD/C:/Test/Example/include

    and the library is not available, because the path is prepended with $$PWD. Is this correct?
    It works, when the pro file and the library are on the same drive.

    win32: LIBS += -L$$PWD/../../Test/Example/lib/ -lexampleLib
    INCLUDEPATH += $$PWD/../../Test/Example/include
    DEPENDPATH += $$PWD/../../Test/Example/include

    Any ideas? Is this a bug in the Qt Creator?

  • Lifetime Qt Champion


    That might indeed be a bug.

    Which version of Qt Creator are you using ?

  • I am using Qt Creator 4.0.3.

  • Lifetime Qt Champion

    Then I'd recommend taking a look at the bug report system to see if it's something known.

Log in to reply