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. Using .lib files in MinGW
Forum Updated to NodeBB v4.3 + New Features

Using .lib files in MinGW

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

    Hi!

    I want link in my project some .lib files , but i use the MinGW compiler.
    How can i setup a link with a .lib file using MinGW in qmake?
    This is important to me since i dont want use Visual Studio and MinGW are being used for android compilation.

    Kind Regards.

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

      Hi!

      • MinGW wiki: Specify the libraries for the linker to use.
      • qmake Manual: Adding Libraries to Projects
      1 Reply Last reply
      2
      • Q Offline
        Q Offline
        quadbyte
        wrote on last edited by
        #3

        example to add to .pro file

        win32-g++ is MinGW

        # SDL2 library 2.0.5
        INCLUDEPATH += $$PWD/thirdparty/SDL2/include
        macx:LIBS += -L$$PWD/thirdparty/SDL2/lib/MacOS -lSDL2
        win32-g++:LIBS += -L$$PWD/thirdparty/SDL2/lib/Windows -lSDL2
        linux-g++:LIBS += -L$$PWD/thirdparty/SDL2/lib/Linux -lSDL2
        
        1 Reply Last reply
        1
        • W Offline
          W Offline
          wwolff
          wrote on last edited by
          #4

          Thanks so Much!

          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