Using CMAKE + VS + windeployqt to run a 64-bit Qt Application
I want to create an graphical user interface for our software which is based on a 64-bit architecture. After 2 days of intense work I set up CMAKE with windeployqt to get all .dll from "Qt\5.9\winrt_x64_msvc2017" copied correctly to my binary directory. Compiling the software with VS leads to this error: (0xc000a200) which belongs to an appcontainer problem (source). The mentioned solution to extend the additional options of the linker with /APPCONTAINER:NO didn't solved the problem.
Further hours in googleling arose the question if my setup is able to produce 64 bit Applictations. The Posts in stackoverflow and Qt-Forum said that I have to have a 64-bit Qt version to build a 64-bit Qt Application.
My questions are:
- Are the two last post still relevant? So do I need a 64-bit Qt (ownbuild) version to build a 64 bit application?
- If not how do I solve the issue (0xc000a200)
- What is the "winrt_x64_msvc2017" Compiler option in Qt-Creator for? Is this for building real windows software or for apps and mobile applications?
- To me Qt VS Tools should make life easier, using Qt and VS. But loading a Qt .pro file results in:
 - C:/QT/5.9/WINRT_X64_MSVC2017/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
I Am using VS 2017, someone has a hint how to solve this issue ?
Thanks in advance for help :)
Hi and welcome to devnet,
The winrt package is to build application for the UWP concept.
If you want to build a classic desktop then yes, you first have to use a 64 bit version of Qt. That one is already available through either the online or the offline installer.
Okay thanks for reply.
I'm developing on Windows and I can't find a 64 bit distribution for Windows in the Download area of Qt. Am I wrong or is the only solution to build it myself?
@goodart There are several 64bit versions of Qt for Windows. What are you using to install it? Qt Online Installer of offline packages?
Thanks for helping.
@goodart Just take the online installer even if it is 32bit - that doesn't matter. The online installer will provide you a list of all available Qt version including 64bit. Then just select the one you need and install.
okay thank you very much. And doing so gives me more librarys in the Qt Installation dir than the one (following) I currently have?
@goodart Not sure I understand your question. Online installer will show you all available Qt versions. Which to install depends on the compiler you want to use. For example mingw53_32 is using MinGW. If you want to use Microsoft C++ compiler then you need MSVC2015 or MSVC2017, but then you need to install the corresponding Visual Studio version.
I don't think you need WinRT.
Ok. I got it. Didn't installed the correct Setup with the online Installer. Now everything is working. Thanks!