I downloaded mysql-connector-c++-8.4.0-winx64 from the official website :
enter image description here
then I write CMakeLists.txt
`#最低要求版本
cmake_minimum_required(VERSION 3.29)
#项目名称
project(hq)
set(CMAKE_PREFIX_PATH “C:Users35497Desktopmysql-connector-c++-8.4.0-winx64” )
set(MYSQL_CONCPP_DIR “C:Users35497Desktopmysql-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}”)`
enter image description here
But I still can’t find this library. I don’t know where the problem is? Thank you very much for helping me solve it.
I tried putting it in other directories, but it still can’t seem to be found
HuangQ is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.