Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. error linking static library
Qt 6.12 LTS is out! See what's new in the release blog

error linking static library

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 2 Posters 561 Views 2 Watching
  • 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 Offline
    S Offline
    sudharsan10
    wrote on last edited by sudharsan10
    #1

    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
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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
      2

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt
      • Unsolved