Michael Japzon
Michael Japzon

Reputation: 201

QT Creator is not auto-detecting MSVC2017 64 bit compiler

I have Qt creator 4.6.0 and Microsoft Visual Studio 2017 Enterprise installed on my system. Through Visual Studio, I have installed "Desktop development with C++" including VC++ 2017 v141 tool set.

When trying to configure the MSVC 2017 64 Kit in Qt Creator, the MSVC compiler is not auto-detected. The only compilers that show are MinGw and Visual Studio 2008 (9.0) I believe I should be seeing "Microsoft Visual C++ Compiler 15.0".

Does anyone know how I can get the compiler to auto detect or add this manually. I can compile and build QT programs in Visual Studio, but would like to use QT Creator.

Thanks in advance.

Upvotes: 6

Views: 15443

Answers (5)

Peter Harvey
Peter Harvey

Reputation: 1

REM *************************************************************************
REM ** SETTING DEVELOPMENT ENVIRONMENT
REM ** - Visual Studio
REM ** - Qt
REM *************************************************************************

D:
cd \svn\trunk
call C:\Qt\5.15.0\msvc2019_64\bin\qtenv2.bat
cmd /K "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"

Upvotes: 0

Alex A
Alex A

Reputation: 335

You can't manually add MSVC to Qt Creator. If you want to use it make sure to have the correct Visual Studio version installed.

Try reinstalling Visual Studio if the MSVC compiler don't appear in the Compilers tab.

Upvotes: -2

ooZberg
ooZberg

Reputation: 33

I had a similar problem, it got it working by installing Visual Studio 2017 with Chocolatey like this:

choco install visualstudio2017community
choco install visualstudio2017-workload-nativedesktop

And after that Qt Creator 4.9 could detect the MSVC2017 compiler without issues.

Upvotes: 2

el famoso
el famoso

Reputation: 150

You have to add it manually then. In the Build & Run settings, compiler tab, click add, custom -> C++, then fill the compiler line with the compiler's path.

But you have to fill correctly the ABI line, and if it doesn't fit any Qt build you already made, then you will have to build Qt from source again from a msvc command prompt.

Upvotes: 6

Related Questions