- 论坛徽章:
- 0
|
各位大虾:
我的程序编译后,能够成功连成点a文件;
可是生成可执行文件是,报gzopen()等函数没有定义;
我查看了一下调用到该函数的文件,已经include了libz.h文件,研究了半天不知道什么原因。
麻烦各位大虾指点指点;
下面是编译的Makefile信息:
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -I. -g -O2 -c xmlIO.c
rm -f .libs/xmlIO.lo
gcc -DHAVE_CONFIG_H -I. -I. -I. -I. -g -O2 -c xmlIO.c -fPIC -DPIC -o .libs/xmlIO.lo
gcc -DHAVE_CONFIG_H -I. -I. -I. -I. -g -O2 -c xmlIO.c -o xmlIO.o >/dev/null 2>&1
mv -f .libs/xmlIO.lo xmlIO.lo
.....
/bin/sh ./libtool --mode=link gcc -g -O2 -o libxml.la -rpath /usr/local/lib -version-info 3:0:1 SAX.lo entit
ies.lo encoding.lo error.lo parser.lo tree.lo xmlIO.lo xmlmemory.lo uri.lo valid.lo xlink.lo HTMLparser.lo HTM
Ltree.lo debugXML.lo xpath.lo nanohttp.lo nanoftp.lo -lz
rm -fr .libs/libxml.la .libs/libxml.* .libs/libxml.*
gcc -shared SAX.lo entities.lo encoding.lo error.lo parser.lo tree.lo xmlIO.lo xmlmemory.lo uri.lo valid.lo x
link.lo HTMLparser.lo HTMLtree.lo debugXML.lo xpath.lo nanohttp.lo nanoftp.lo -lz -lc -Wl,-soname -Wl,libxml
.so.2 -o .libs/libxml.so.2.1.0
出错提示信息:
/home/prpnx255/picccar/lib/libxml.a(xmlIO.o)(.text+0x2a2): In function `xmlGzfileOpen':
/home/prpnx255/picccar/carci/libxml/xmlIO.c:383: undefined reference to `gzopen'
/home/prpnx255/picccar/lib/libxml.a(xmlIO.o)(.text+0x2bf):/home/prpnx255/picccar/carci/libxml/xmlIO.c:372: undefined reference to `gzdopen
根据出错信息,可以确定是xmlIO.c文件调用gzopen,但该文件已经把gzopen的头文件libz.h包涵了。 |
|