Unable to build example code

  • Hi have freshly installed QT on a new Windows 10 PC. I loaded the media player example code but I can't build it. I get the following output in the "General Messages" pane:

    Running Windows Runtime device detection.
    No winrtrunner.exe found.
    Could not find qmake spec 'default'.
    Error while parsing file C:\Qt\Examples\Qt-5.9\multimediawidgets\player\player.pro. Giving up.
    C:/Qt/5.9/msvc2015_64/mkspecs/features/toolchain.prf(129): Variable QMAKE_CXX.COMPILER_MACROS is not defined.
    Project ERROR: msvc-version.conf loaded but QMAKE_MSC_VER isn't set
    Error while parsing file C:\Qt\Examples\Qt-5.9\multimediawidgets\player\player.pro. Giving up.

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Did you install Visual Studio ?

    You seem to be using Qt for WinRT, any specific reason for that ?

  • I do have VS2017 installed.
    The specific reason I am using Qt for WinRT is ignorance! I am brand new to Qt, coming from the Microsoft world, and I thought it would be interesting to build this example. Sounds like I need to change a taget setting somewhere?

  • Lifetime Qt Champion

    You should either install Qt for MinGW (with compiler provided) or install Qt for Visual Studio 2015. There's no binary yet for 2017 but it's not a real problem since for the first time Microsoft provides a compiler which is backward compatible (In this case only with 2015).

    If you go with VS route, then you'll need to clone the default Kit and change the the compiler to the one from 2017. Then it should work nicely.

  • Thanks! I think I'll try MinGW. Trying to escape from Visual Studio....

Log in to reply

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