could not find any instance of Visual Studio
It used to work, but when I installed the Libs for Specter component, I got the following error.
C:\Development\wsbuild64>cmake -G "Visual Studio 16 2019" -A x64 C:\Development\wireshark
CMake Error at CMakeLists.txt:39 (project):
Generator Visual Studio 16 2019
could not find any instance of Visual Studio.
Even setting the path of the EXE to VS2019 in the Path environment variable was useless.
Moreover, menus such as "x64 Native Tools Command Prompt for VS 2019" under VisualStadio2019 in the startup menu have been deleted.
The details are as follows.
Previously the above command worked.
I got the below error message in CMakeError.log.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(486,5): error MSB8040: Spectre mitigation library is required for this project. For the toolsets and architectures used, install them from the Visual Studio Installer (individual components tab). Detailed information:https://aka.ms/Ofhn4c [C:\Development\wsbuild64\CMakeFiles\CMakeTmp\cmTC_85026.vcxproj]
I installed the Libs for Specter component
I want to resolve the instance not found error.
Comments
I selected "Desktop development with C++" in the installer and reinstalled it, but I can't solve it.
Setting the following environment variables solved it.
VS160COMNTOOLS="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools"
But I am getting the first error.
I want to resolve this error.
All individual components named "Libs for Specter" are already installed.
The full text of the error message is below.
Performing C SOURCE FILE Test C_Qspectre_VALID failed with the following output:
Change Dir: C:/Development/wsbuild64/CMakeFiles/CMakeTmp
Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe cmTC_0715b.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=16.0 /v:m && .NET Framework 向け Microsoft (R) Build Engine バージョン 16.11.2+f32259642
Copyright (C) Microsoft Corporation.All rights reserved.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(486,5): error MSB8040: Spectre mitigation library is required for this project. For ... (more)
I solved it by installing "MSVC v142~Libs for Specter".
But I got a new error.
If it's better to ask the question in another thread, please let me know.
For the time being, I will continue as is.
Please help me to resolve this error.
The error message is below.
None of the files existed in CMakeTmp.
==================================================
Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output:
Change Dir: C:/Development/wsbuild64/CMakeFiles/CMakeTmp
(omission)
cl /c /Zi /W3 /WX- /diagnostics:caret /MP /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D CHECK_FUNCTION_EXISTS=pthread_create /D "CMAKE_INTDIR=\"Debug\"" /Gm- /RTC1 /MDd /GS /guard:cf /fp:precise /Qspectre /Zc:wchar_t /Zc:forScope /Zc:inline /std:c11 /Fo"cmTC_14dfa.dir\Debug\" /Fd"cmTC_14dfa.dir\Debug\vc142.pdb" /external:W3 /Gd /TC /wd4200 /wd5105 /errorReport:queue /Zo /utf-8 /w34295 /w34100 /w34189 "C:\Program Files\CMake\share\cmake-3.24\Modules\CheckFunctionExists.c ... (more)
Try removing the wsbuild64 directory, re-creating it, and running CMake again in that directory.
If that doesn't work, try to attach all the output from CMake here.
The command prompt showed the following error message:
Changing to "WIRESHARK_QT6_PREFIX_PATH=C:\Qt\6.4.0" worked for me.
command prompt=========================================
CMake Error at CMakeLists.txt:1236 (find_package):
By not providing "FindQt6Core5Compat.cmake" in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
"Qt6Core5Compat", but CMake did not find one.
Could not find a package configuration file provided by "Qt6Core5Compat"
=========================================
But I got the below error.
command prompt=========================================
CMake Warning at CMakeLists.txt:594 (message): Windows SDK 10.0.19041.0 doesn't support C11. Please make sure you're using 10.0.20348.0 or later.
=========================================
When I installed the Windows SDK 10.0.20348.0 and re-executed it, the following error occurred.
As you can see, it's an error with the same issue number as the first error.
I don't know what is wrong please help me.
command prompt=========================================
CMake Error ... (more)