如何配置codeblocks以编译Mysql~

 

如何配置codeblocks以编译Mysql~

分类: Linux mysql

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

转自:http://blog.csdn.net/wangyawen0305/article/details/7938210

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。