Ubuntu和centos下Codeblocks 配置 mysql
Ubuntu下,使用了codeblocks,有各种编写代码的方便之处,但是遇到类似MySQL这样的文件,编译时需要附带链接库等,就很麻烦了,以下是搜到的可以顺利编译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
centos中使用另一种方法: