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



  • 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!


  • Qt Champions 2016

    @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.



  • 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



  • 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.


  • Qt Champions 2016

    @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.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.