2007-12-24 09:12
tsfuyf
linux下编译错误,请大虾帮忙看看!谢谢了!
suselinux9下编译sybase的db程序是报错:
cc -I. -I/home/sybase/OCS-12_5/include bulkcopy.c /home/sybase/OCS-12_5/lib/libsybdb.a -lm -o bulkcopy
/home/sybase/OCS-12_5/lib/libsybdb.a(dbcursut.o)(.text+0xc7): In function `db__crs_search_phrase':
: undefined reference to `__ctype_tolower'
/home/sybase/OCS-12_5/lib/libsybdb.a(dbcursut.o)(.text+0x133): In function `db__crs_search_phrase':
: undefined reference to `__ctype_tolower'
/home/sybase/OCS-12_5/lib/libsybdb.a(intslist.o)(.text+0x38a): In function `intl__strblist':
: undefined reference to `__ctype_b'
/home/sybase/OCS-12_5/lib/libsybdb.a(intnent.o)(.text+0xd2): In function `intl_nextentry':
: undefined reference to `__ctype_b'
/home/sybase/OCS-12_5/lib/libsybdb.a(intnent.o)(.text+0x120): In function `intl_nextentry':
: undefined reference to `__ctype_b'
/home/sybase/OCS-12_5/lib/libsybdb.a(intnent.o)(.text+0x1c8): In function `intl_nextentry':
: undefined reference to `__ctype_b'
/home/sybase/OCS-12_5/lib/libsybdb.a(intnval.o)(.text+0x457): In function `intl_nextvalue':
: undefined reference to `__ctype_b'
/home/sybase/OCS-12_5/lib/libsybdb.a(intnval.o)(.text+0x481): more undefined references to `__ctype_b' follow
collect2: ld returned 1 exit status
make: *** [bulkcopy] Error 1
这是一个sybase的样例程序,在suselinux8下编译正常。用的都是原来的makefile,不知道是啥原因,谁知道请告知。
2007-12-27 14:33
freestream
gcc 版本不对。
你需要老版本的gcc,例如gcc3.2,可以下载源码编译,然后加到改环境变量PATH里,把其路径放在/usr/bin的前面。