Is pre-compiled Qt 5.9 VS version independent? - visual-studio

On the Qt website, in the download section, there is a pre-compiled Qt5.9 available.
Before Qt5.9 there were different pre-compiled packages for each Visual Studio version.
Is new pre-compiled Qt5.9 VS version independent?
If not, for which version is it?

No, it's not. It can't be since visual c++ versions are usually* not binary compatible (*just now Visual Studio 2017 is binary compatible with 2015).
That package just has different versions you can install, to target Windows: VS2013 (x64), VS2015(x64 and x86), VS2017(x64), MinGW and to target Android (arm and x86).

Related

Targeting older Windows versions (Windows Server 2008 R2)

I have an older Windows 10 workstation with Rust 1.37 (stable-x86_64-pc-windows-msvc) and Visual Studio 2017 with the following features:
Visual C++ Build Tools core features
VC++ 2017 version 15.9 v14.16 latest v141 tools
Visual C++ 2017 Redistributable Update
Windows 10 SDK (10.0.17763.0)
Visual C++ tools for CMake
Testing tools core features - Build Tools
On this workstation, I can compile a program that runs fine on my target environment (Windows Server 2008 R2).
I have a newer Windows 10 workstation on which I installed the legacy version of Visual Studio 2017. Interestingly, the installer doesn't offer the exact same options for C++ build tools, but I think I have the necessary ones, e.g.:
VC++ 2017 version 15.9 v14.16 latest v141 tools
Visual C++ tools for CMake and Linux
Windows 10 SDK (10.0.17763.0)
However, when I compile the program (with the same Rust version/toolchain) on this computer, it errors out on my target environment with "The program can't start because VCRUNTIME140.dll is missing from your computer".
What am I missing here? How can I setup rustup/cargo to target my specific environment?
I think It’s because of not choosing some components when you install the vs.
by the way, vs 2015 is not a good choice.
So it turns out I was wrong: my project was not compiled with stable-x86_64-pc-windows-msvc on my older computer. I had at some point installed the x86_64-pc-windows-gnu toolchain and set it as the override for this project. Changing my toolchain to x86_64-pc-windows-gnu on the new computer produced a binary that was able to run on the target machine.
Rather than deleting this question, I'll leave it here for others who may need to target older Windows environments:
If you are having problems running a Rust binary on an older Windows computer, try compiling with x86_64-pc-windows-gnu rather than msvc.

Does Qt 5.6 and QtCreator work with MS Visual Studio Community 2015

I'm trying to used the prebuilt version of Qt 5.6 and Qt Creator with Microsoft Visual Studio Community 2015
When I try to compile one of the example Qt programs (filesystembrowser) I get the following error message:
Error while building/deploying project filesystembrowser (kit: Desktop Qt 5.6.0 MSVC2015 64bit) When executing step "Make"
and the Issue
Qt Creator needs a compiler set up to build. Configure a compiler in the kit options.
When I check Tools/Options/Kits, all of the auto detected compilers MSVC2015 32bit and 64bit have a red warning icon and in the Compiler field the message
"No Compiler"
Is it possible that the prebuilt version of Qt 5.6 is not compatible with MSVC 2015 Community edition? or am I doing something else wrong??
Version 14.0.23107.0 D14REL
Microsoft .NET Framework
Version 4.6.01055
Installed Version: Community
Maybe choose one of the offline installers instead of the online installers. It appears Qt 5.6.0 is built for VS2015. http://www.qt.io/download-open-source/#section-2
Use Qt Visual Studio Tools visual studio extension. it will do all the work, you can create a new Qt application right in the visual studio or import an existing one (+debugging, ...)
link: https://marketplace.visualstudio.com/items?itemName=TheQtCompany.QtVisualStudioTools-19123

How can I find out which version of Qt Visual Studio Addin to install for different version of Visual Studio?

Different versions of the Qt Visual Studio Addin are available for download at
Qt Visual Studio Addin
How do I know which version to install for different versions of Visual Studio?
I'm running Visual Studio 2012, but would like to know a general answer.
Don't use the archive by default, use it only if you need older version.
The Visual Studio addin you need depends on the Qt version you want, for Qt 5 you need version 1.2.4 and for Qt 4 you need 1.1.11, see the download section here

How can CMake determine the version of Visual Studio 2010?

I need to check programmatically whether SP1 is installed for Visual Studio 2010, since all our prebuilt libraries were built with this version. What's the best way to do that in CMake?
Check the value of the CMAKE_CXX_COMPILER_VERSION global variable.
For VS10SP1, the version should be 16.00.40219.01, for the non-SP1 version it should be 16.00.30319.01.
If you are stuck with an old CMake version (older than 2.8.12) that does not support CMAKE_CXX_COMPILER_VERSION, take a look at the CMakeDetermineVSServicePack module.

Download Qt sdk on windows-32 bit system: which one to choose between MinGW 4.7, VS 2010, VS 2010 OpenGL?

I would like to download Qt sdk (libraries+ IDE Qt Creator).
I'm on a win-32 system but there is 3 choices for Windows 32-bit system :
Qt 5.0.2 for Windows 32-bit (MinGW 4.7, 650 MB)
Qt 5.0.2 for Windows 32-bit (VS 2010, 485 MB)
Qt 5.0.2 for Windows 32-bit (VS 2010, OpenGL, 476 MB)
What are the differences between them and which one to choose for having Qt sdk on a win-32 system ?
Thanks in advance!
Depends on your compiler.
Use
MinGW 4.7 if your compiler is MinGW 4.7
VS 2010 if you're on visual studio 10 compiler
The decision what binaries you download is the decision what compiler you'll use too.
If you are not sure or use another one, better you download the sourcecode of qt and compile your own.
Here's how to do so:
Building Qt Desktop for Windows with MinGW
Building Qt Desktop for Windows with MSVC
Hint: realy make shure you use the mingw version mentioned in the documentation, else you can get this problem.

Resources