安装mysql数据库
CMakeLists.txt中配置mysql数据库
# 先指定mysql数据库的安装位置
include_directories("C:/Program Files/MySQL/MySQL Server 8.0/include")
link_directories("C:/Program Files/MySQL/MySQL Server 8.0/lib")
link_libraries(libmysql)# 链接Qt库,这里是链接了Qt下面的Widgets库和SerialPort库,OpenCV库
target_link_libraries(NaMi PRIVATE Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::SerialPort ${OpenCV_LIBS} libmysql)