从官网下载的msql-3.8源码包,./setup的时候,check出了好多no,有些通过安装一些软件包可以搞定,但是如下面那些,不知咋整?
----------------------+-------------------------------+-----------------------------------
checking whether we are cross compiling... no
checking for main in -lsocket... no
checking for main in -lnsl... yes
checking for main in -lgen... no
checking for main in -lx... no
checking sys/sockio.h usability... no
checking sys/sockio.h presence... no
checking for sys/sockio.h... no
checking select.h usability... no
checking select.h presence... no
checking for select.h... no
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
----------------------+-------------------------------+-----------------------------------
但是,setup之后可以make all和make install,也可启动msql,并在终端里面对数据库进行各种操作,不过想在C语言程序里面调用mSQL API查询,编译时出现了如下的错误:
/tmp/ccfv1lbi.o: In function `main':
mquery.c:(.text+0x27): undefined reference to `msqlConnect'
mquery.c:(.text+0x50): undefined reference to `msqlSelectDB'
mquery.c:(.text+0x8e): undefined reference to `msqlQurry'
mquery.c:(.text+0xa6): undefined reference to `msqlStoreResult'
mquery.c:(.text+0xdf): undefined reference to `msqlDataSeek'
mquery.c:(.text+0xed): undefined reference to `msqlFetchRow'
mquery.c:(.text+0x13d): undefined reference to `msqlClose'
collect2: ld 返回 1
我看了一下/usr/local/msql3/include/msql.h里面关于这几个函数的定义,如下:
int APIENTRY msqlConnect __ANSI_PROTO((char *));
int APIENTRY msqlSelectDB __ANSI_PROTO((int, char*));
int APIENTRY msqlQuery __ANSI_PROTO((int, char*));
int APIENTRY msqlExplain __ANSI_PROTO((int, char*));
int APIENTRY msqlCreateDB __ANSI_PROTO((int, char*));
int APIENTRY msqlDropDB __ANSI_PROTO((int, char*));
int APIENTRY msqlShutdown __ANSI_PROTO((int));
int APIENTRY msqlGetProtoInfo __ANSI_PROTO((void));
int APIENTRY msqlReloadAcls __ANSI_PROTO((int));
只有这些个定义,没有找到具体函数是怎么是实现的。。。求大牛们帮忙~~
mini SQL的一点问题,求大牛解
其它类软件,非上述版软件
前往
- 公告/注意事项
- ↳ 新闻和通知
- ↳ 软件推荐
- 系统安装
- ↳ 教学和常见问答
- ↳ 系统安装和升级
- ↳ 启动和引导
- ↳ 网卡无线拨号
- ↳ 硬件与内核
- ↳ 笔记本及便携设备
- ↳ Ubuntu衍生版
- ↳ 其他类Unix OS发行版
- ↳ Debian发行版
- 配置美化
- ↳ 中文显示和输入法
- ↳ 个人配置文件存放点
- ↳ 软件文档翻译
- ↳ 窗口管理器及美化
- ↳ 桌面展示
- 软件使用
- ↳ 办公、图像、机械电子设计等
- ↳ Vim和Emacs
- ↳ 开源模板库
- ↳ 互联网相关软件
- ↳ 影音多媒体
- ↳ 游戏和模拟器
- ↳ 虚拟机和虚拟化
- ↳ Wine及其分支
- ↳ 其它类软件
- 服务器管理
- ↳ 服务器运维
- ↳ 云计算和容器(K8S/KVM/Docker/WSL等)
- ↳ Ubuntu VPS
- 程序设计与开发
- ↳ Shell脚本
- ↳ 软件/网站开发
- ↳ 内核及嵌入式开发
- ↳ Ubuntu编译和打包
- ↳ 开源小工具
- ↳ 挑战任务
- 感想与交流
- ↳ 深度PK版
- ↳ Ubuntu故事和感慨
- ↳ 同城交流
- ↳ 校园社团
- ↳ 港澳台校区
- ↳ 国外校区
- 站务区
- ↳ 论坛管理
- ↳ Ubuntu中文网上商店