Linux下C++访问mysql出现函数undefined reference
2009-10-03 00:13
746 查看
原因是没有把链接库引进来,
解决方法是
g++ src.cc -o src.out -L/usr/lib/mysql -lmysqlclient -lz
一般在makefile的LIBS尾部加入-L/usr/lib/mysql -lmysqlclient -lz
解决方法是
g++ src.cc -o src.out -L/usr/lib/mysql -lmysqlclient -lz
一般在makefile的LIBS尾部加入-L/usr/lib/mysql -lmysqlclient -lz
相关文章推荐
- linux下出现undefined reference to `mysql_init' 的解决方法
- linux下用codeblocks用C++访问mysql出现的问题!
- ubuntu上在使用c/c++连接mysql时,出现undefined reference错误解决办法
- MySQL connector C++在Linux下编译undefined reference to 'get_driver_instance'问题
- 关于arm-linux-gcc交叉编译工具链,实现自己的crt0或者编译UBOOT出现undefined reference to `__aeabi_unwind_cpp_pr0'的解决方法
- [C++] 链接出现的undefined reference to
- linux 下安装opencv3.0在编译时出现的问题undefined reference to `parallel_pthreads_set_threads_num(int)'
- symbian c++ 调用标准C的函数产生undefined reference错误解决方案
- ubuntu服务器linux部署thinkphp出现Undefined class constant 'MYSQL_ATTR_INIT_COMMAND'解决方案
- 【嵌入式Linux】[内核编译]:内核编译时出现的问题:undefined reference to `__gnu_mcount_nc'
- Linux下eclipse编译C/C++程序遇到 undefined reference to `pthread_create'的异常解决办法
- Linux下C++访问MySQL
- linux c/c++ undefined reference to 'pthread_create' 未定义pthread_create问题
- window下工具访问linux下mysql出现 error no 2003 10061错误的解决办法
- linux 链接库文件出现“undefined reference to" 问题的解决方法
- Linux下C++访问MySQL
- Linux下C++访问MySQL
- inline函数出现 undefined reference 错误
- C++调用C静态库,出现undefined reference to “” 的问题