Qt 5.5 static building failed on "mockserviceplugin1.lib"



  • I tried to do static build for Qt 5.5, together with win32-msvc2012, but failed as described:

    Microsoft (R) Program Maintenance Utility Version 11.00.61030.0
    Copyright (C) Microsoft Corporation. All rights reserved.

        "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\BIN\nmake.exe" -
    

    f Makefile.Release

    Microsoft (R) Program Maintenance Utility Version 11.00.61030.0
    Copyright (C) Microsoft Corporation. All rights reserved.

        link /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO /SUBSYSTEM:WINDOWS "
    

    /MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' versio
    n='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='' processorArchitecture
    ='
    '" /MANIFEST /MANIFESTFILE:release\musicplayer.exe.embed.manifest /OUT:releas
    e\musicplayer.exe @C:\Users\Z003JZ7Z\AppData\Local\Temp\nmCF2A.tmp
    LINK : fatal error LNK1181: cannot open input file 'mockserviceplugin1.lib'
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0
    \VC\BIN\link.EXE"' : return code '0x49d'
    Stop.
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0
    \VC\BIN\nmake.exe"' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    Stop.

    Can anyone help me?



  • @KevinWang Where is the mockserviceplugin1.lib file? It can't find it and I'm guessing you don't have that library installed or the build process doesn't know where to find it and needs a -L with the path.



  • Thank you AmberShark for reply, but I really don't know what's the "mockserviceplugin1.lib", i can't find it at all in my computer, is it possible that Qt use this library to build up?



  • @KevinWang Ah I thought it was part of your project. I googled it and it looks like it's a bug:

    https://bugreports.qt.io/browse/QTBUG-50184

    It seems to present when building the Qt tests, so what I would do to avoid this is add -nomake tests -nomake examples to your ./configure line.

    That will speed up your build anyway and take care of that bug for you. :)



  • @ambershark Thank you for your suggestion, but it still doesn't work by adding "-nomake tests -nomake examples".
    I think i need to find other solutions.



  • @KevinWang Oh I am so sorry, I read that bug wrong.. it is dependent on the libs that the tests generate. So you need to compile the tests in order for compilation to finish. Which is exactly the opposite of what I told you to do, lol.

    If you want to go another route you can just fix it yourself by removing that lib from the link line.

    I haven't looked into it deeply but it should be easy to fix all the spots that might use it. It is not a Qt library that is needed.


Log in to reply
 

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