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. .a file was built instead of .lib on windows
Forum Updated to NodeBB v4.3 + New Features

.a file was built instead of .lib on windows

Scheduled Pinned Locked Moved Unsolved General and Desktop
10 Posts 5 Posters 2.6k Views 1 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.
  • N Offline
    N Offline
    Ndgt
    wrote on last edited by
    #1

    I want to build qtbase module from git on Windows.

    git clone https://github.com/qt/qtbase.git
    git switch 6.5.3
    cmake -S . -B build -G Ninja
    cd build 
    ninja
    cmake --install .
    

    I noticed that .a libaries were installed instead of .lib libraries in C:/Qt/Qt-6.5.3/lib.
    Are the .a libraries files installed by default?

    Christian EhrlicherC 1 Reply Last reply
    0
    • N Ndgt

      I want to build qtbase module from git on Windows.

      git clone https://github.com/qt/qtbase.git
      git switch 6.5.3
      cmake -S . -B build -G Ninja
      cd build 
      ninja
      cmake --install .
      

      I noticed that .a libaries were installed instead of .lib libraries in C:/Qt/Qt-6.5.3/lib.
      Are the .a libraries files installed by default?

      Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Ndgt said in .a file was built instead of .lib on windows:

      Are the .a libraries files installed by default?

      When you use MinGW, yes.
      MSVC creates .lib as import libs.

      btw: Why do you want to compile such an old Qt verison?

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      1
      • N Offline
        N Offline
        Ndgt
        wrote on last edited by
        #3

        Is there any way to build .lib file when using Ninja & MinGW ?
        When I set Visual Studio 17 2022 as Generator, the build failed.

        I want to create a plugin for animation software that requires Qt 6.5.3.

        jsulmJ 1 Reply Last reply
        0
        • N Ndgt

          Is there any way to build .lib file when using Ninja & MinGW ?
          When I set Visual Studio 17 2022 as Generator, the build failed.

          I want to create a plugin for animation software that requires Qt 6.5.3.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Ndgt said in .a file was built instead of .lib on windows:

          Is there any way to build .lib file

          Why do you need .lib files if you're using MinGW?!
          .a is all you need...

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1
          • N Offline
            N Offline
            Ndgt
            wrote on last edited by
            #5

            I thought .a files are specific to Linux so I misunderstood that because the compiler did not link .lib the following error occurs.

            The procedure entry point _ZN10QArayData10deallocateEPS_xx could not be located in the dynamic link library C:\Qt\Qt-6.5.3\dev\example\build\childwidget.exe.
            

            Why does this error happen?

            Christian EhrlicherC 2 Replies Last reply
            0
            • N Ndgt

              I thought .a files are specific to Linux so I misunderstood that because the compiler did not link .lib the following error occurs.

              The procedure entry point _ZN10QArayData10deallocateEPS_xx could not be located in the dynamic link library C:\Qt\Qt-6.5.3\dev\example\build\childwidget.exe.
              

              Why does this error happen?

              Christian EhrlicherC Offline
              Christian EhrlicherC Offline
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote on last edited by Christian Ehrlicher
              #6

              @Ndgt said in .a file was built instead of .lib on windows:

              Why does this error happen?

              Because you can not mix MSVC and MinGW c++ libraries.

              Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
              Visit the Qt Academy at https://academy.qt.io/catalog

              1 Reply Last reply
              3
              • hskoglundH Offline
                hskoglundH Offline
                hskoglund
                wrote on last edited by
                #7

                Maybe you get more problems because the entry point is called "_ZN10QArrayData10deallocateEPS_xx" and not "_ZN10QArayData10deallocateEPS_xx"

                1 Reply Last reply
                0
                • N Ndgt

                  I thought .a files are specific to Linux so I misunderstood that because the compiler did not link .lib the following error occurs.

                  The procedure entry point _ZN10QArayData10deallocateEPS_xx could not be located in the dynamic link library C:\Qt\Qt-6.5.3\dev\example\build\childwidget.exe.
                  

                  Why does this error happen?

                  Christian EhrlicherC Offline
                  Christian EhrlicherC Offline
                  Christian Ehrlicher
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @Ndgt said in .a file was built instead of .lib on windows:

                  I thought .a files are specific to Linux so I misunderstood that because the compiler did not link .lib the following error occurs.

                  When does this happen and what are you trying? Why do you need to compile Qt6 by yourself in the first place?

                  Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                  Visit the Qt Academy at https://academy.qt.io/catalog

                  1 Reply Last reply
                  0
                  • N Offline
                    N Offline
                    Ndgt
                    wrote on last edited by
                    #9

                    It seems that I simply forgot to place the necessary libraries in the build directory.
                    After I put Qt6Core.dll, Qt6Gui.dll, Qt6Widgets.dll, Qt6PrintSupport, and the plugins folder into the build directory, I successfully executed the notepad example.

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

                      Hi,

                      If you meant that you started your application outside of Qt Creator, then that's normal because you need to "deploy" your application as if you would make it usable on a different computer. That's what windeployqt does for you.

                      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
                      1

                      • Login

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