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. QT Generating .LIB when it shouldn't be - Release Build extremely slow, Debug Build very fast
QtWS25 Last Chance

QT Generating .LIB when it shouldn't be - Release Build extremely slow, Debug Build very fast

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 1.0k Views
  • 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.
  • C Offline
    C Offline
    Cysis145
    wrote on last edited by Cysis145
    #1

    Hello,

    Hopefully someone can explain exactly what is going on here. Essentially my project has decided to start building really really slowly (takes around 2-4 minutes) and after several hours of trying to figure out why, i've discovered that for some reason QT is building the .exe without any issues but also making a .lib and .exp which is what is causing the stupidly long build time (bare in mind this was originally building within 15 seconds). There is nothing in the project file telling it to generate a lib nor anything in the compiler build steps. I honestly don't understand why it's randomly decided to start doing this.

    Here is a screenshot of the last few lines from the Compile Output: https://gyazo.com/3f51bfcfb5fe902f9ba7efe1b10cc112

    Has anyone else come across this problem? Could someone point me into the direction on how to fix this. Don't want the lib just the exe.

    Thanks!

    EDIT: This only seems to happen in Release. Whenever i run in Debug mode it compiles in 10 seconds, but in release it takes 2 minutes! I haven't had this issue with any of my other projects. I guess i have a work around but it still shouldn't be taking that long to build in release. And i still don't know why it's generating a lib. All insights are welcome!

    kshegunovK 1 Reply Last reply
    0
    • C Cysis145

      Hello,

      Hopefully someone can explain exactly what is going on here. Essentially my project has decided to start building really really slowly (takes around 2-4 minutes) and after several hours of trying to figure out why, i've discovered that for some reason QT is building the .exe without any issues but also making a .lib and .exp which is what is causing the stupidly long build time (bare in mind this was originally building within 15 seconds). There is nothing in the project file telling it to generate a lib nor anything in the compiler build steps. I honestly don't understand why it's randomly decided to start doing this.

      Here is a screenshot of the last few lines from the Compile Output: https://gyazo.com/3f51bfcfb5fe902f9ba7efe1b10cc112

      Has anyone else come across this problem? Could someone point me into the direction on how to fix this. Don't want the lib just the exe.

      Thanks!

      EDIT: This only seems to happen in Release. Whenever i run in Debug mode it compiles in 10 seconds, but in release it takes 2 minutes! I haven't had this issue with any of my other projects. I guess i have a work around but it still shouldn't be taking that long to build in release. And i still don't know why it's generating a lib. All insights are welcome!

      kshegunovK Offline
      kshegunovK Offline
      kshegunov
      Moderators
      wrote on last edited by
      #2

      @Cysis145 said in QT Generating .LIB when it shouldn't be:

      ll insights are welcome!

      My guess would be you have exports in your exe (for some reason), which is triggering the creation of an import library (.lib) and the .exp file (which I think is some exports database).

      This also seems to concur with my suspicion.

      Read and abide by the Qt Code of Conduct

      1 Reply Last reply
      0
      • C Offline
        C Offline
        Cysis145
        wrote on last edited by
        #3

        Thanks for the reply,

        I had one export which im not sure why it was there, but it is still doing this. This is also only happening in Release mode.

        I did some further testing and found that it is actually building very quickly like it does in debug, though for some reason after it generates all the files, the compiler just becomes idle for about a minute and then finishes. Normally when you build with qt my cpu reaches 100% but after the first 10 seconds when the compiler output just stops the cpu drops to 0%. It is litterally doing nothing and then one minute later it decides, "oh wait a minute i need to finish building" and then completes the build.

        I've been testing for nearly a week now and getting nowhere. I'm using QT5.7 with MSVC 2015 64bit

        It honestly wouldn't surprise me if it's windows it self causing the issue

        kshegunovK 1 Reply Last reply
        0
        • hskoglundH Offline
          hskoglundH Offline
          hskoglund
          wrote on last edited by
          #4

          Hi just guessing here, but when you mention ".. one minute later ..." I'm thinking of some type of internet/network timeout, for example when your Microsoft Team Foundation Server is disconnected.

          1 Reply Last reply
          0
          • C Cysis145

            Thanks for the reply,

            I had one export which im not sure why it was there, but it is still doing this. This is also only happening in Release mode.

            I did some further testing and found that it is actually building very quickly like it does in debug, though for some reason after it generates all the files, the compiler just becomes idle for about a minute and then finishes. Normally when you build with qt my cpu reaches 100% but after the first 10 seconds when the compiler output just stops the cpu drops to 0%. It is litterally doing nothing and then one minute later it decides, "oh wait a minute i need to finish building" and then completes the build.

            I've been testing for nearly a week now and getting nowhere. I'm using QT5.7 with MSVC 2015 64bit

            It honestly wouldn't surprise me if it's windows it self causing the issue

            kshegunovK Offline
            kshegunovK Offline
            kshegunov
            Moderators
            wrote on last edited by
            #5

            @Cysis145 said in QT Generating .LIB when it shouldn't be - Release Build extremely slow, Debug Build very fast:

            It honestly wouldn't surprise me if it's windows it self causing the issue

            Possibly. Also Henry might be onto something., because what you describe would indeed be consistent with a process waiting for an IO operation (socket, input, w/e) to complete. But I don't exactly know why this might be happening, I only compile on Windows, I don't develop on it.

            Read and abide by the 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