您的位置:首页 > 数据库 > MySQL

如何配置codeblocks以编译Mysql~

2014-12-17 15:42 253 查看

如何配置codeblocks以编译Mysql~

分类: Linux mysql2012-09-03 15:51 872人阅读 评论(2) 收藏 举报
mysqlcompilerlinkerincludesearchbuild

linux下,使用了codeblocks,有各种编写代码的方便之处,但是遇到类似mysql这样的文件,编译时需要附带链接库等,就感觉手足无措,

似乎就没办法编译了,本来是用codeblocks编辑好代码后,仍然通过终端来编译,但是毕竟不是个办法,so,果断百度找办法……

以下是搜到的可以顺利编译Mysql的解决方法:

进入 project ------> build options
a. compiler settings tab -------> other options: 添加 `mysql_config --cflags` (此处非单引号,而是反点,在Tab键的上面一个按键)
b. linker settings tab -> other options: 添加 `mysql_config --libs`
to get codecompletion you probably need to add the include dir to your project
c. search directories tab -> compiler: 添加 /usr/include/mysql

转自:/article/2149294.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: