Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

error linking static library



  • I have a project which I have declared as static lib.
    c2c77b01-1816-4ac6-a1ff-01c636b98689-image.png

    In my main application, I have provided the INCLUDEPATH and LIBS ( path of the debug file).
    b26d73d2-ece4-43c4-956d-9e6986a299bf-image.png

    I referred to several posts and comments on how to link static lib. But I am unable to figure out where Im going wrong.

    I have included the header file of the library.

    1ac81285-0406-4601-8b0f-ce0e37af43e2-image.png

    I am getting the following error while calling the library functions:
    a31788ed-4e76-496a-bc27-53b7261058d2-image.png

    8c01e12f-c728-4648-9055-b909697e6be9-image.png
    Can someone please clarify this? Is something wrong with my .pro declarations maybe incorrect path?


  • Lifetime Qt Champion

    Hi,

    "-L" is to add a search path for libraries for the linker. "-l" is to link a library.


Log in to reply