MySQL社区

 找回密码
 注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

搜索
查看: 2472|回复: 4
打印 上一主题 下一主题

linux下C编译mysql出错 求大神啊

[复制链接]
跳转到指定楼层
1#
发表于 2012-8-6 18:32:35 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
find / -name mysql.h
/usr/include/mysql/mysql.h 头文件
find / -name libmysqlclient.so
/usr/lib/mysql/libmysqlclient.so
/usr/lib/libmysqlclient.so   链接库
运行命令gcc   -o  insert   insert.c   -lmysqlclient   -L/usr/lib/mysql   -I/usr/include/mysql
出错|
/usr/bin/ld: skipping incompatible /usr/lib/libmysqlclient.so when searching for -lmysqlclient
/usr/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status
或者运行命令
gcc   -o  insert   insert.c   -lmysqlclient     -L/usr/lib   -I/usr/include/mysql
出错:
/usr/bin/ld: skipping incompatible /usr/lib/libmysqlclient.so when searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/lib/libmysqlclient.so when searching for -lmysqlclient
/usr/bin/ld: cannot find -lmysqlclient
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友 微信微信
收藏收藏 分享淘帖 顶 踩
2#
 楼主| 发表于 2012-8-7 16:11:47 | 只看该作者
唉 没人帮忙
3#
 楼主| 发表于 2012-8-8 10:26:37 | 只看该作者
求回贴啊
4#
发表于 2012-8-17 21:38:55 | 只看该作者
为啥不用.configure?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|申请友链|小黑屋|Archiver|手机版|MySQL社区 ( 京ICP备07012489号   
联系人:周生; 联系电话:13911732319

GMT+8, 2024-4-29 05:38 , Processed in 0.064614 second(s), 22 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表