How to compile Qt 5.7.1 or 5.8.0 using clang msvc 2015?



  • I am attempting to compile Qt from source using the clang msvc 2015 mkspecs.
    I have run
    "call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat"a" to set the microsoft c++ compiler and then run

    configure -platform win32-clang-msvc2015 -shared -opensource -nomake examples -nomake tests -release -qt-libjpeg -qt-libpng -qt-zlib.

    Currently I get an error returning

    libcmt.lib(chkstk.obj) : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\link.EXE"' : return code '0x458'
    Stop.
    Building qmake failed, return code 2

    EDIT: I am fixed the error above but clang is now looking for .pch files.

    error: unable to read PCH file .pch\release\Qt5Core_pch.pch: 'no such file or directory'
    fatal error: PCH file '.pch\release\Qt5Core_pch.pch' not found
    2 errors generated.
    NMAKE : fatal error U1077: '"C:\Program Files\LLVM\bin\clang-cl.EXE"' : return code '0x1'
    Stop.
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\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.


  • Lifetime Qt Champion

    Hi,

    Did you re-run configure from a clean state ?


Log in to reply
 

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