mini SQL的一点问题,求大牛解

其它类软件,非上述版软件
回复
wm1301
帖子: 2
注册时间: 2009-07-11 11:18

mini SQL的一点问题,求大牛解

#1

帖子 wm1301 » 2009-07-15 15:11

从官网下载的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));
只有这些个定义,没有找到具体函数是怎么是实现的。。。求大牛们帮忙~~
回复