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. Convert file.lib to file .a (QT MinGW)
Forum Updated to NodeBB v4.3 + New Features

Convert file.lib to file .a (QT MinGW)

Scheduled Pinned Locked Moved General and Desktop
7 Posts 5 Posters 8.9k Views 3 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
    Salvatello
    wrote on last edited by
    #1

    you can transform a .lib file (using a file.dll) .a in a file?
    I'll explain, I have a .lib file that I need to use in a project in qt mingw.
    So I need the file .ae not the .lib file.
    Is there a converter or a way to do this?

    1 Reply Last reply
    0
    • Chris KawaC Online
      Chris KawaC Online
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by
      #2

      MinGW supports libraries in both formats: .a and .lib

      The file format is not the problem. The problem is that the .lib file was probably compiled using MSVC which means that it might or might not be compatible with MinGW, depending on what compiler settings were used and what interface does the lib expose (C or C++), which features were used (eg. STL) and how it links to the CRT.

      If you know all these things are ok then you can go ahead and link to the .lib just as you would to the .a

      If you don't know these things the "safe" way is to recompile the library using MinGW. There is no "converter".

      Word of caution: don't "try and see if it works" if you're not sure. It might "seem" to work but if it's not compatible it will lead to very subtle and hard to debug problems.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        Salvatello
        wrote on last edited by
        #3

        OK. he said the manufacturer of the library.
        I wrote that is not compatible with mingw.
        Thanks for the help you have given me.

        1 Reply Last reply
        0
        • sarasadaS Offline
          sarasadaS Offline
          sarasada
          wrote on last edited by
          #4

          Hello,

          I have the same problem as you. How did you solve it? How did you recompile the library using MinGW

          mrjjM 1 Reply Last reply
          1
          • sarasadaS sarasada

            Hello,

            I have the same problem as you. How did you solve it? How did you recompile the library using MinGW

            mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @sarasada
            Hi and welcome
            It really depends on the library.
            Some can be recompiled with mingw some are nearly impossible.
            So there is not one answer that covers all LIBS.

            1 Reply Last reply
            0
            • sarasadaS Offline
              sarasadaS Offline
              sarasada
              wrote on last edited by sarasada
              #6

              hi,

              Thanks for the answer. How can I tell from the .lib or .dll file if it is possible to recompile them? I'm using a 3rd party library provided by the hardware company.

              K 1 Reply Last reply
              0
              • sarasadaS sarasada

                hi,

                Thanks for the answer. How can I tell from the .lib or .dll file if it is possible to recompile them? I'm using a 3rd party library provided by the hardware company.

                K Offline
                K Offline
                koahnig
                wrote on last edited by
                #7

                @sarasada

                For recompilation you need to have the source code.

                If it is not available you need to know the compilation parameters from the lib-supplier as already discussed 2 years ago in the original post.

                Vote the answer(s) that helped you to solve your issue(s)

                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