摘要: 调用mysql UDF api 扩展mysql 函数时,如果使用g++ 编译器编译动态链接库,在声明udf函数时,需要加上 extern "C" 的声明,否则,在mysql中添加自定义函数时,会报找不到对应函数的错误消息;正确的声明形式:extern "C" {xxx_();xxx_init();xxx_deinit();}注:要使用mysql udf 功能呢个,需要 用with-mysqld-ldflags=-rdynamic设定MySQL。() 阅读全文
posted @ 2013-02-21 17:17 bo-study 阅读(255) 评论(0) 推荐(0) 编辑
摘要: gcc 链接库文件的方式:1:直接在编译选项后加上库文件的绝对地址:$ gcc -Wall calc.c /usr/lib/libm.a -o calc2:通过 -l 选项:$ gcc -Wall calc.c -lm -o calc链接库文件时,可以通过 -L 选项指定库文件的路径;Following the standard Unix convention for search paths, several directories can be specified together in an environment variable as a colon separated list;W 阅读全文
posted @ 2013-02-21 17:14 bo-study 阅读(529) 评论(0) 推荐(0) 编辑