deepin下Clion连接mysql_CLion如何添加依赖库 ? 需要把mysql/Connector c++放入 用cpp连接数据库...
目前我把下載的mysql/Connector 下載后放在了project內(nèi) 但是報(bào)錯(cuò)信息如下
報(bào)錯(cuò)信息如下
In file included from /Users/wsgdrfz/study/c++/Libary_System/librarySystem/sqlConnection.h:/Users/wsgdrfz/study/c++/Libary_System/librarySystem/sqlFiles/include/mysql_connection.h7::
15:/Users/wsgdrfz/study/c++/Libary_System/librarySystem/sqlFiles/include/mysql_connection.h10::15 :10: error: error: 'cppconn/connection.h' file not found with include; use "quotes" instead'cppconn/connection.h' file not found with include; use "quotes" instead
#include #include
^~~~~~~~~~~~~~~~~~~~~~
^~~~~~~~~~~~~~~~~~~~~~ "cppconn/connection.h"
"cppconn/connection.h"
In file included from In file included from /Users/wsgdrfz/study/c++/Libary_System/librarySystem/sqlConnection.cpp:5:
In file included from /Users/wsgdrfz/study/c++/Libary_System/librarySystem/sqlConnection.h:8:
/Users/wsgdrfz/study/c++/Libary_System/librarySystem/sqlFiles/include/mysql_driver.h/Users/wsgdrfz/study/c++/Libary_System/librarySystem/main.cpp::152::
10In file included from :/Users/wsgdrfz/study/c++/Libary_System/librarySystem/sqlConnection.h :8:
error: /Users/wsgdrfz/study/c++/Libary_System/librarySystem/sqlFiles/include/mysql_driver.h:15'cppconn/driver.h' file not found with include; use "quotes" instead:10
: error: 'cppconn/driver.h' file not found with include; use "quotes" instead
#include
^~~~~~~~~~~~~~~~~~
#include "cppconn/driver.h"
^~~~~~~~~~~~~~~~~~
"cppconn/driver.h"
/Users/wsgdrfz/study/c++/Libary_System/librarySystem/sqlConnection.cpp:28:12: error: calling a protected destructor of class 'sql::Driver'
delete driver;
^
/Users/wsgdrfz/study/c++/Libary_System/librarySystem/sqlFiles/include/cppconn/driver.h:26:10: note: declared protected here
virtual ~Driver() {}
^
2 errors generated.
3 errors generated.
make[2]: *** [CMakeFiles/librarySystem.dir/main.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/librarySystem.dir/sqlConnection.cpp.o] Error 1
make[1]: *** [CMakeFiles/librarySystem.dir/all] Error 2
make: *** [all] Error 2
文件引用情況如下:
在網(wǎng)上搜索有很多連接的方法 目前還是有點(diǎn)暈 望指教
總結(jié)
以上是生活随笔為你收集整理的deepin下Clion连接mysql_CLion如何添加依赖库 ? 需要把mysql/Connector c++放入 用cpp连接数据库...的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 地下城与勇士DNF战斗法师怎么加点?
- 下一篇: 投屏怎么投到电视上?乐播投屏可以吗?