Why these Issues when installing Qt Creator afresh? - visual-studio

After a couple of days of trying to get Qt Creator to build a Windows GUI project I received from a colleague, I decided to remove my previous installation and re-install Qt from a clean slate.
Using the latest "Community" version installer from the Qt website, I selected the Qt toolchain version 5.11.2, including MinGW 5.3.0 32-bit, Qt Sources and Qt Scripts.
I did not select any MS Visual Studio related toolchains. However, on my machine there is an updated VS Community installed.
After installation was done, I started Qt Creator, and before even selecting a project to open, I get these errors reported in the Issues pane (in the image, also is the Help/About popup):
Why does Qt look for the MSVS scripts, and moreover, why is it not able to run cmd.exe as reported by the 1st error. The VS scripts are exactly in the reported path.
How should I eliminate theses errors?

Related

Is Microsoft C++ Build Tools available as portable (without installation)

We are currently using CUDA on windows which requires MS C++ Build tools installed. With every new version of the CUDA toolkit it happens that newer versions of Visual Studio are not supported. That's why we are using the MS build tools seperately so that the VS version doesn't matter.
Since its hard to guide our developers to install the right CUDA and MSVC version we have packaged it into NUGET packages so that the toolkit (especially NVCC) is in a defined version and location. Additionally we wanted to do this with MSVC but we couldn't find a good solution since the installer obviously does modifications on several places that we don't know.
Is there any good way to get the MSVC tools portable so that we can simply drop it into a folder and put the right pathes?
NVCC doesn't support GCC, otherwise I would have gone with this.

Is the LLVM-vs2014 toolset removed from clang 7 and 8? [duplicate]

This question already has an answer here:
LLVM 7.0 does not provide specific Platform Toolset on Visual Studio 2015
(1 answer)
Closed 3 years ago.
Using clang 6.0.1 I can create MSVC projects with LLVM-vs2014 toolchain to build them with clang.
Clang 7.x and 8.x seem not to include such a toolchain. Is the feature deprecated, unsupported, or is there just another way to use it?
I does seem that the VS specific toolchains are not included in the later releases of Clang. You can always check what build tools are available by right clicking your project in VisualStudio selecting Properties and then look under Platform Toolset:
Another option is to use this visual studio extension which should allow you to use an existing installation of clang you have on your machine.
Finally, starting with Visual Studio 2017, there is an experimental version of Clang that you can use as a platform toolset called Clang/C2. You'll need to run the Visual Studio Installer to ensure that you have installed it, but otherwise it should show up in the platform toolset as v141_clang_c2 as shown in the image above.
Edit: As per the comment below, it seems that Clang/C2 has been abandoned and is no longer a good, long term option.
I've spent a lot of time in the past trying to get newer versions of clang to play nice with Visual Studio and it hasn't been fun (or fruitful). Hopeful this type of support gets better in the future. As a side note, if you're not generating solution files with CMake and instead use Visual Studio "Open Project" feature for CMake based projects, you may be able to manually set CMAKE_CXX_COMPILER and CMAKE_C_COMPILER to force the use of Clang.

kernel32.lib error while building VS2013 project on Cmake in windows 10

I'm working on windows 10 and I want to build the CLAPACK library for VS2013 using CMake.
Now I'm getting error in linking kernel32.lib.
I used to get this error inside Visual Studio during the building process, but I've solved it by including "D:\Program Files (x86)\Windows Kits\10\Lib\10.0.15063.0\um\x64" in the additional libraries section.
I've also tried to uninstall the SDK and reinstall it, with no hope.
Is there anyway to manually include the library directory in the building process in Cmake, or any other way to fix this error?
EDIT #1:
quoted from this answer
The Windows 10 Creators Update SDK made some significant changes to
what is installed as part of the installation to minimize on-disk
footprint. This is a Known Issue that results from that refactoring
work where the "desktop" components of the Creators Update SDK do not
get installed by default.
EDIT #2:
could it be a compatibility issue between VS 2013 and windows 10?
my SDK version is 10.0.15063 which needs desktop components to be added manually, my problem is I don't know how to solve this for the VS as whole not a specific project.

How to debug in Qt Creator under Windows?

I want to have the same developing environment either in Linux and in Windows so I decided to use Qt Creator. But for some unknown reason I cannot trace my project in Qt Creator under Windows 7. I compile my program as DEBUG target, the resulting executable contains all debug info. After that I press F10 key to step over main function but instead of stepping it just brings program to run. Stepping into via F11 does the same thing.
Firstly I tried gdb shipped with MinGW but Qt Creator refused even to run it complaining that it should be Python capable. After that I have downloaded and installed gdb with Python support from
http://download.qt-project.org/development_releases/prebuilt/gdb/windows-7/qtcreator-gdb-7.4-MINGW32_NT-6.1-i686.tar.gz
as Qt Creator manual recommends but it just made that Qt Creator is able to start the debugger and nothing more, I could not do source level debugging anyway.
Qt Creator under Linux works fine with the same project, it traces, steps and shows the sources Ok. I run MinGW 4.8.1 and Qt Creator 3.1.1 under Windows 7 64bit and the same Qt Creator 3.1.1 version under Fedora Linux 64bit. How can I achieve source level debugging under Windows like under Linux I do?
The best thing is to use Visual studio express compiler and then install the windows debugging tools like specified here and configure qt-creator
Recent GDB builds shipped with MinGW are Python-enabled, and work out-of-the-box in Qt Creator. The link you found seems outdated.

using Qt 5.0 with Qt Creator and vs2010 compiler

I recently decided to upgrade from Qt 4.X to 5, though now it has only vs2010 supported. Whenever I start Qt Creator I get that there isn't any compiler (and there are no options in the settings to set one).
Question:
How do I download the vs2010 compiler? Do I have to download vs2010 itself? Will I get a debugger as well?
I have tried this suggestion, but Qt didn't pick up the compiler: Using Visual Studio as a Compiler for QT Creator
Sorry if this question have been asked before, but I have been unable to find a source that explains what I should do.
Seems like you didn't install MSVC yet. Get it from Microsoft website.
Than download sources from Nokia. Unpack them to a new folder e.g C:\QtSources and compile them with MSVC. This instructions are working just fine.
Finally add them to Qt Creator in
Tools -> Options -> Building -> Qt Versions
by poiting to your new qmake executable in
C:\QtSources\bin\qmake.exe
Hope Qt 5 will work with free Express Edition of MSVC.
You shouldn't need to re-compile Qt, as the SDK version is built with msvc2010 32-bit. For debugging, you may need to download the Windows SDK 8. Qt Creator may auto-detect your compiler and debugger, but if not, proceed as follows:
Under Options/Build & Run/Qt Versions, point to qmake.exe
Under Options/Build & Run/Kits, set "Qt Version" to the one you just created, and set your compiler and debugger
The compiler should be auto-detected if it's on your system.
The debugger is something like C:\Program Files\Windows Kits\8.0\Debuggers\x86\cdb.exe.
Good luck!

Resources