Qt Forum

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

    Solved error linking static library

    General and Desktop
    2
    2
    68
    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.
    • S
      sudharsan10 last edited by sudharsan10

      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?

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi,

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

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

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