UIC crashes when build QT5.5.1 with Visual Studio 2013



  • Hello,

    I am trying to build Qt with static linking to the MSVC runtime. I have changed the /Md(d) cl flags to /Mt(d) and have followed this post ...

    My build is in c:\qt\qt5.5.1-vs2013 with my source in c:\qt\qt5.5.1-src

    however when I build Qt UIC gpf's I have tried building it via jom and just using nmake but there is no difference here (not to surprised by this!).

    Does anyone have any pointers?

    the build config is as follows..

    call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86
    set QMAKESPEC=win32-msvc2013
    set QTDIR=C:\Qt\Qt5.5.1-src\qtbase
    set PATH=%QTDIR%\bin;%PATH%
    
    ..\qt5.5.1-src\configure -debug-and-release -opensource -platform win32-msvc2013 -opengl desktop -nomake examples -nomake tests
    
    

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Crash or error ? What do you get exactly ?



  • I get a windows message box saying that uic.exe has stopped working with the following details:

    Problem signature:
      Problem Event Name:		APPCRASH
      Application Name:			uic.exe
      Application Version:		0.0.0.0
      Application Timestamp:	56e7e7e4
      Fault Module Name:		ntdll.dll
      Fault Module Version:		6.1.7601.19160
      Fault Module Timestamp:	56bcd51f
      Exception Code:			c0000005
      Exception Offset:			0003dae8
      OS Version:				6.1.7601.2.1.0.256.48
      Locale ID:				2057
      Additional Information 1:	0a9e
      Additional Information 2:	0a9e372d3b4ad19135b953a78882e789
      Additional Information 3:	0a9e
      Additional Information 4:	0a9e372d3b4ad19135b953a78882e789
    
    

  • Lifetime Qt Champion

    Do you want to only link to the static runtime or build a static Qt ?



  • I think the answer is that I want to only link to the static runtime... or to give an expanded response of my aim.. What I want at the end of the day is a set of Qt dlls which do not have any dependencies on the MSVC runtime dlls.



  • @RobinI

    Why don't you want dependencies to MSVC runtime dlls?



  • I don't want dependencies to the MSVC runtime DLLs because all of the other internal libraries that we use are compiled with Mt(d). This was decided before I joined the company as we didn't the support queries that could arise from installing the MSVC runtime when it has been already installed.



  • @RobinI

    Fair enough. Have you tried using Dependency Walker on your uic.exe?



  • No I haven't but other than verifying that UIC was built with static MSVC libraries what else would it tell me? I did however load some of the dlls (qt5core.dll & qt5gui.dll) to verify that the runtime was statically linked.



  • @RobinI

    Well, just that, you can check if there any dependencies you are not expecting. Although I'd not expect the program to start if any were missing.

    In the configure line you posted:

    ..\qt5.5.1-src\configure -debug-and-release -opensource -platform win32-msvc2013 -opengl desktop -nomake examples -nomake tests

    I don't see the -static option?



  • i will try adding the -static option but won't that build just the .lib's?

    Update: Building Qt (well just qtbase) with the -static option succeeds as does building Qt(base) with the MD(d) cl flags. I am really puzzled by this.

    I don't want to use the -static option due to LGPL licensing issues.


  • Lifetime Qt Champion

    No, it will build everything but statically which is not what you'd like to do AFAIU.



  • @SGaist
    yes that is what I thought and I also didn't want the LGPL licensing issues that this would incur too.



  • further updates...

    I have tried to build Qt 5.4 with vs2013 and again UIC.exe crashes but when i built 5.6 with vs2015 with statically linked msvc runtime libraries it does not but does with 2013!

    Since we will be moving to use vs2015 this will be fine but I am still puzzled why Qt does not like vs2013 with the MT(d) flags.


Log in to reply
 

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