【cpp/c++ summary 工具】 Hunter 报错 CMake hunter error: Unexpected MSVC_VERSION

MSVC与Hunter版本不兼容问题解决
  • 原因:使用的MSVC编译器版本较高,而Hunter版本较低,可在https://github.com/cpp-pm/hunter/releases配置高版本Hunter
# HunterGate(
#     URL "https://github.com/cpp-pm/hunter/archive/v0.23.297.tar.gz"
#     SHA1 "3319fe6a3b08090df7df98dee75134d68e2ef5a3"
# ) 

HunterGate(
    URL "https://github.com/cpp-pm/hunter/archive/v0.25.7.tar.gz"
    SHA1 "99f05ff154c682f7349546d66294d2f69f7193bc"
)

在这里插入图片描述

# 显式查找 PCL 及其特定模块 find_package(PCL 1.14.1 REQUIRED COMPONENTS common io) include_directories(${PCL_INCLUDE_DIRS}) link_directories(${PCL_LIBRARY_DIRS}) add_definitions(${PCL_DEFINITIONS}) add_executable(pcl_version_check pcl_version_check.cpp) target_link_libraries(pcl_version_check ${PCL_LIBRARIES}) D:\QT_project\untitled1\CMakeLists.txt:56: error: Call stack: D:/QT_project/untitled1/CMakeLists.txt:56 (find_package) D:/QT_project/untitled1/build/Desktop_Qt_6_8_3_MSVC2022_64bit-Debug/.qtc/package-manager/maintenance_tool_provider.cmake:322 (find_package) D:/LightSpark/QT__/PCL1.14.1/cmake/PCLConfig.cmake:559 (find_external_library) D:/LightSpark/QT__/PCL1.14.1/cmake/PCLConfig.cmake:294 (find_boost) D:/LightSpark/QT__/PCL1.14.1/cmake/PCLConfig.cmake:121 (find_package) D:/QT_project/untitled1/CMakeLists.txt:56 (find_package) D:/QT_project/untitled1/build/Desktop_Qt_6_8_3_MSVC2022_64bit-Debug/.qtc/package-manager/maintenance_tool_provider.cmake:322 (find_package) D:/LightSpark/QT__/PCL1.14.1/cmake/PCLConfig.cmake:559 (find_external_library) D:/LightSpark/QT__/PCL1.14.1/cmake/PCLConfig.cmake:294 (find_boost) D:/LightSpark/QT__/PCL1.14.1/cmake/PCLConfig.cmake:121 (find_package) D:/QT_project/untitled1/CMakeLists.txt:56 (find_package) D:/QT_project/untitled1/build/Desktop_Qt_6_8_3_MSVC2022_64bit-Debug/.qtc/package-manager/maintenance_tool_provider.cmake:322 (find_package) D:/LightSpark/QT__/PCL1.14.1/cmake/PCLConfig.cmake:559 (find_external_library) D:/LightSpark/QT__/PCL1.14.1/cmake/PCLConfig.cmake:294 (find_boost) D:/LightSpark/QT__/PCL1.14.1/cmake/PCLConfig.cmake:121 (find_package) D:/QT_project/untitled1/CMakeLists.txt:62 (add_executable) :-1: error: The command "D:\QT\Tools\CMake_64\bin\cmake.exe -S D:/QT_project/untitled1 -B D:/QT_project/untitled1/build/Desktop_Qt_6_8_3_MSVC2022_64bit-Debug" terminated with exit code 1. :-1: error: CMake returned error code: 1
最新发布
07-11
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值