gcc编译c语言调用mysql存储过程代码出现的问题list
来源:互联网 发布:益盟软件怎样 编辑:程序博客网 时间:2024/04/29 01:21
结局:
原因:没有装 mysql-devel-5.0.22-2.1.i386.rpm
[root@localhost RPMS]#yum install mysql-devel
2.问题:/tmp/ccyHfsX2.o(.text+0x1e): In function `main':
: undefined reference to `mysql_init'
/tmp/ccyHfsX2.o(.text+0x47): In function `main':
: undefined reference to `mysql_real_connect'
/tmp/ccyHfsX2.o(.text+0x76): In function `main':
: undefined reference to `mysql_query'
/tmp/ccyHfsX2.o(.text+0x9a): In function `main':
: undefined reference to `mysql_affected_rows'
/tmp/ccyHfsX2.o(.text+0xbc): In function `main':
: undefined reference to `mysql_error'
/tmp/ccyHfsX2.o(.text+0xcf): In function `main':
: undefined reference to `mysql_errno'
/tmp/ccyHfsX2.o(.text+0xf5): In function `main':
: undefined reference to `mysql_close'
/tmp/ccyHfsX2.o(.text+0x11f): In function `main':
: undefined reference to `mysql_errno'
/tmp/ccyHfsX2.o(.text+0x135): In function `main':
: undefined reference to `mysql_error'
/tmp/ccyHfsX2.o(.text+0x148): In function `main':
: undefined reference to `mysql_errno'
collect2: ld returned 1 exit status
结局:在gcc最后加上-I/usr/include/mysql/ -L/usr/lib/mysql/ `mysql_config --cflags --libs`这句话。
例如:[root@zieckey mysql]# gcc -o insert insert.c -I/usr/include/mysql/ -L/usr/lib/mysql/ `mysql_config --cflags --libs`
3.问题:安装了mysql后在启动service mysql start时显示unrecognized service。
结局:装一个mysql-server就可以了。我是直接yum install mysql-server
- gcc编译c语言调用mysql存储过程代码出现的问题list
- C语言调用mysql的存储过程
- C#中调用mysql存储过程出现的问题
- C语言调用mysql存储过程出错
- gcc编译c语言的uint问题
- 调用MySQL存储过程的Java代码
- c/c++调用MySql的存储过程
- mysql多次调用存储过程的问题
- C语言代码的整个编译过程
- gcc编译C语言程序的执行过程
- 从gcc探究C语言的编译过程
- gcc编译c语言(访问数据库mysql)时可能遇到的问题
- C语言再学习 -- GCC编译过程
- GCC之C 语言编译过程
- GCC之C 语言编译过程
- GCC之C 语言编译过程
- C++ 调用mysql的存储过程 出现1312错误
- JDBC调用Sql server 2005 存储过程出现的问题
- 制作月牙的gui—笔记
- vs2008的JavaScript 语法提示(Intellisense)功能
- 编写出更优秀软件的 10 条建议
- 指针内存分配
- MeeGo 年底复活
- gcc编译c语言调用mysql存储过程代码出现的问题list
- Oracle数据库管理
- 互联网产品主要为谁而设计?
- 彩色图像直方图均衡化及颜色直方图显示 opencv实现 完整代码及详细注释
- warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
- Source Insight3.5中如何加入.cc文件(非SI默认扩展文件)
- coco2d-x学习之程序启动流程
- Android 内存浅析【管理、机制、分析】
- Could anyone explain these undefined behaviors (i = i++ + ++i , i = i++, etc…)