[急等]linux环境C++使用mysql api 连接问题

everestsun 2008-02-22 10:31:05
///
如下所示,好像与连接库有关
///
系统没有安装mysql

mysql/libmysqlclient.a(mf_pack.o)(.text+0x49a): In function `unpack_dirname':
: warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
mysql/libmysqlclient.a(libmysql.o)(.text+0x345a): In function `mysql_real_connect':
: warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
mysql/libmysqlclient.a(mf_pack.o)(.text+0x4a5): In function `unpack_dirname':
: warning: Using 'endpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
mysql/libmysqlclient.a(my_gethostbyname.o)(.text+0xe): In function `my_gethostbyname_r':
: warning: Using 'gethostbyname_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
mysql/libmysqlclient.a(libmysql.o)(.text+0xeac): In function `mysql_once_init':
: warning: Using 'getservbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
mysql/libmysqlclient.a(my_compress.o)(.text+0x73): In function `my_compress_alloc':
: undefined reference to `compress'
mysql/libmysqlclient.a(my_compress.o)(.text+0x15c): In function `my_compress':
: undefined reference to `compress'
mysql/libmysqlclient.a(my_compress.o)(.text+0x23b): In function `my_uncompress':
: undefined reference to `uncompress'
...全文
568 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
chenxfu 2008-02-24
  • 打赏
  • 举报
回复
关注~~~~~~~~
zhxhz 2008-02-24
  • 打赏
  • 举报
回复
系统没有安装mysql ,出次问题那很有可能是mysql的库没有安装的原故,如已经安装则是编译时未指定头文件或库文件所在路径的缘故

23,110

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 应用程序开发区
社区管理员
  • 应用程序开发区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧