我从官网下载了mysql-connector-c++-8.4.0-winx64:
然后我写CMakeLists.txt
\`#最低要求版本
cmake_minimum_required(VERSION 3.29)
#项目名称
project(hq)
set(CMAKE_PREFIX_PATH "C:\\Users\\35497\\Desktop\\mysql-connector-c++-8.4.0-winx64" )
set(MYSQL_CONCPP_DIR "C:\\Users\\35497\\Desktop\\mysql-connector-c++-8.4.0-winx64")
message("CMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}")
message("MYSQL_CONCPP_DIR=${MYSQL_CONCPP_DIR}")
find_package(MYSQL_CONCPP CONFIG )
message("MYSQL_CONCPP_FOUND=${MYSQL_CONCPP_FOUND}")
message("MYSQL_CONCPP_LIBRARIES=${MYSQL_CONCPP_LIBRARIES}")
message("MYSQL_CONCPP_INCLUDE_DIRS=${MYSQL_CONCPP_INCLUDE_DIRS}")
message("mysql-concpp_VERSION=${mysql-concpp_VERSION}")\`
但是我还是找不到这个库。不知道问题出在哪里?非常感谢您帮我解决问题。
我尝试放到其他目录下,但好像还是找不到
我也遇到了这个问题,我下载了调试版本,但仍然出现
[CMake] C:/Users/26621/Desktop/mysql-connector-c++-9.1.0-winx64/lib64. (missing: 1> [CMake] MYSQL_CONCPP_FOUND) (found version "9.1.0") 1> [CMake] Call Stack (most recent call first):
以上错误