Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Problem's including a static library in Qt
Forum Updated to NodeBB v4.3 + New Features

Problem's including a static library in Qt

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 3 Posters 742 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.
  • RIVOPICOR Offline
    RIVOPICOR Offline
    RIVOPICO
    wrote on last edited by
    #1

    Hello i'm trying to include a static library in Qt i do the follow:

    LIBS += -LC:/Users/moh/Desktop/gloox/ -llibgloox.a
    

    But i dont know why return me all time:

    :-1: error: LNK1104 'libgloox.a.lib'
    

    How i could include my static library how i do normally in other ide's . In Qt i couldnt. Thanks in advance!

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      It's the same as everywhere else:

      LIBS += -LC:/Users/moh/Desktop/gloox/ -lgloox
      
      1 Reply Last reply
      1
      • RIVOPICOR Offline
        RIVOPICOR Offline
        RIVOPICO
        wrote on last edited by
        #3

        now i checked and I think the problem is not Qt i think the problem is because for windows compiler static libraries are .lib and for mingw compiler are .a? I'm right or wrong?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          You can't mix and match C++ libraries built with MinGW and Visual Studio. Up to VS2015 you can't even use .dll from different versions of VS.

          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
          0

          • Login

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