Unable to use msvc in projects
-
when i use msvc in my qt projects a warning sign shows on my project folder even i configure the msvc properly. Can anyone help me solve this problem. I am a bigner.
-
Put the mouse cursor over the warning icon - you should see a popup with the warning. What does it say?
Does your project build and run? -
@BILAL-KHAN-34 So, what do you see in "Projects->Build"?
-
-
@BILAL-KHAN-34 did you install the mcvc compiler and other necessary c++ tools via the visual studio installer ?
3rd Parties, like the QtCompany, are not allowed to distribute it themself. It has to go through Microsoft.
-
@BILAL-KHAN-34
I can see the number 3 on the Issues tab.... -
@BILAL-KHAN-34 Please check what @J-Hilk wrote
-
@jsulm <html><body><code style="white-space:pre;font-family:Source Code Pro">
"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.41.34120/bin/HostX64/x64/cl.exe"is not able to compile a simple test program.
It fails with the following output:
Change Dir: 'D:/QT Course/Projects/test9/build/Desktop_Qt_6_7_2_MSVC2019_64bit-Debug/CMakeFiles/CMakeScratch/TryCompile-5vg4eh'
Run Build Command(s): C:/Qt/Tools/Ninja/ninja.exe -v cmTC_2b5db
[1/2] C:\PROGRA~1\MICROS~3\2022\COMMUN~1\VC\Tools\MSVC\1441~1.341\bin\HostX64\x64\cl.exe /nologo /TP -DQT_QML_DEBUG /DWIN32 /D_WINDOWS /GR /EHsc /Zi /Ob0 /Od /RTC1 -MDd /showIncludes /FoCMakeFiles\cmTC_2b5db.dir\testCXXCompiler.cxx.obj /FdCMakeFiles\cmTC_2b5db.dir\ /FS -c "D:\QT Course\Projects\test9\build\Desktop_Qt_6_7_2_MSVC2019_64bit-Debug\CMakeFiles\CMakeScratch\TryCompile-5vg4eh\testCXXCompiler.cxx"
[2/2] C:\Windows\system32\cmd.exe /C "cd . && C:\Qt\Tools\CMake_64\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\cmTC_2b5db.dir --rc=rc --mt=CMAKE_MT-NOTFOUND --manifests -- C:\PROGRA~1\MICROS~3\2022\COMMUN~1\VC\Tools\MSVC\1441~1.341\bin\Hostx64\x64\link.exe /nologo CMakeFiles\cmTC_2b5db.dir\testCXXCompiler.cxx.obj /out:cmTC_2b5db.exe /implib:cmTC_2b5db.lib /pdb:cmTC_2b5db.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
FAILED: cmTC_2b5db.exe
C:\Windows\system32\cmd.exe /C "cd . && C:\Qt\Tools\CMake_64\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\cmTC_2b5db.dir --rc=rc --mt=CMAKE_MT-NOTFOUND --manifests -- C:\PROGRA~1\MICROS~3\2022\COMMUN~1\VC\Tools\MSVC\1441~1.341\bin\Hostx64\x64\link.exe /nologo CMakeFiles\cmTC_2b5db.dir\testCXXCompiler.cxx.obj /out:cmTC_2b5db.exe /implib:cmTC_2b5db.lib /pdb:cmTC_2b5db.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
RC Pass 1: command "rc /fo CMakeFiles\cmTC_2b5db.dir/manifest.res CMakeFiles\cmTC_2b5db.dir/manifest.rc" failed (exit code 0) with the following output:
no such file or directory
ninja: build stopped: subcommand failed.</code></body></html> -
It looks like you updated your Visual C++ installation and the paths to the compilers are no longer valid.
(exit code 0) with the following output:
no such file or directoryI usually do the following:
- Go to Qt Creator > Preferences > Kits > Compilers
- Click on Remove All
- Click on Re-detect
- Restart Qt Creator
Then reconfigure my project with a clean build, or having clicked on Clear CMake Configuration.
-
Thanks to everyone the problem has solved and all is done. First I was thinking that downloading the msvc from qt maintanance tool is enogh but it was not. I have to download the microsoft visual studio and set it up for qt.
-