clion导入mysql库_mysql,c++_CLion如何添加依赖库 ? 需要把mysql/Connector c++放入 用cpp连接数据库,mysql,c++,clion - phpStudy...

CLion如何添加依赖库 ? 需要把mysql/Connector c++放入 用cpp连接数据库

目前我把下载的mysql/Connector 下载后放在了project内 但是报错信息如下

报错信息如下

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

文件引用情况如下:

在网上搜索有很多连接的方法 目前还是有点晕 望指教

相关阅读:

我在php7上安装composer报错,为啥报的是php5.dll丢失,难道是php7不支持composer吗

正则表达式引擎本身是如何做匹配的

怎样把自己的应用添加到”活动“

gulp任务的先后问题

请教正则如何匹配不被<>包含的/?

想控制弹出窗禁止弹出,直接跳转到另个页面

eclipse导入项目时无法finish

SpringMVC 启动错误

c# 模拟微信 https请求

关于Storyboard在IOS7和IOS8上很有趣的约束问题,束手无策。

移动 UI 框架你们选哪个?

怎样应对突发的大流量?应该怎样部署服务器?

cocos lua可以在IDE真机调试,release后真机停止运行,怎么办啊?

新手写的兼容ie的placeholder求意见

这个长度大于10的时候为什么还能提交成功呢?

webpack配置问题编译报错Output filename not configured.

curl判断网址是否存在

关于文件读入的一个问题

Windows下安装github for Windows后打开gitshell报错

天猫移动页面的header使用了top:-1px?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值