奇怪:为什么sybase静态库中找到到__ctype_tolower?
/sybase/sybase/OCS-12_5/lib/libsybdb.a(dbcursut.o)(.text+0xc7): In function `db__crs_search_phrase':: undefined reference to `__ctype_tolower'
/sybase/sybase/OCS-12_5/lib/libsybdb.a(dbcursut.o)(.text+0x133): In function `db__crs_search_phrase':
: undefined reference to `__ctype_tolower'
/sybase/sybase/OCS-12_5/lib/libsybdb.a(intslist.o)(.text+0x38a): In function `intl__strblist':
: undefined reference to `__ctype_b'
/sybase/sybase/OCS-12_5/lib/libsybdb.a(intnent.o)(.text+0xd2): In function `intl_nextentry':
: undefined reference to `__ctype_b'
/sybase/sybase/OCS-12_5/lib/libsybdb.a(intnent.o)(.text+0x120): In function `intl_nextentry':
: undefined reference to `__ctype_b'
/sybase/sybase/OCS-12_5/lib/libsybdb.a(intnent.o)(.text+0x1c8): In function `intl_nextentry':
: undefined reference to `__ctype_b'
/sybase/sybase/OCS-12_5/lib/libsybdb.a(intnval.o)(.text+0x457): In function `intl_nextvalue':
: undefined reference to `__ctype_b'
/sybase/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: *** Error 1
编译OCS-12_5/sample/dblibrary下的例程,出现错误,lib/libsybdb.a应该是安装syb ase时编译好了的啊,怎么会出现没有定义的`__ctype_tolower'和`__ctype_b'啊.
我的linux是2.6.9-55,难道 是版本或gcc版本用问题?
附makefile
# Make the DB-Library sample programs.#
# Change the following definitions as appropriate for your site.
# Note: the examples use static (e.g. libsybdb.a) libraries, but
# one can also use dynamic libraries, please change as required.
# SYBASE = /usr/u/sybase
CC = cc
INCDIR = $(SYBASE)/$(SYBASE_OCS)/include
LIBDIR = $(SYBASE)/$(SYBASE_OCS)/lib
HEADERS = $(INCDIR)/sybfront.h\
$(INCDIR)/sybdb.h
INCLUDE = -I. -I$(INCDIR)
# Default 32 bit environment
DBLIBS = $(LIBDIR)/libsybdb.a
# If building for SGI 64-bit platform, comment out the above line and
# uncomment the line below.
#DBLIBS = $(LIBDIR)/libsybdb64.a
# Uncomment the next definition and comment the previous definition if
# building on Digital Unix. Further change -ldnet_stub to -ldnet if DECNet
# is installed.
#DBLIBS = $(LIBDIR)/libsybdb.a-ldnet_stub
# If building in a DCE environment for SGI, uncomment the appropriate
# definition below and comment out the current definition.
#DBLIBS = $(LIBDIR)/libsybdb_r.a-Bdynamic -ldce
#DBLIBS = $(LIBDIR)/libsybdb_r64.a-Bdynamic -ldce
# If building for SGI add compile option for 32 bit (n32) or 64 bit (64).
#CFLAGS = -n32 -mips3
#CFLAGS = -64 -mips3
# If building for HPUX 64 bit platform please enable the following line(s):
#CFLAGS = -DSYB_LP64 +DA2.0W +DS2.0 +Z
#DBLIBS = $(LIBDIR)/libsybdb64.a
#if building for HPUX IPF 64 bit platform please enable the following line(s):
#CFLAGS = -DSYB_LP64 +DD64
#DBLIBS = $(LIBDIR)/libsybdb64.a
# If building for Linux IA64 platform please enable the following lines(s):
#CFLAGS = -DSYB_LP64
#DBLIBS = $(LIBDIR)/libsybdb64.a
# If building for 32-bit rs6000(SYBPLATFORM rs6000),
# uncomment and use the following:
#CC = xlc
# If building for 64-bit rs6000(SYBPLATFORM rs600064),
# uncomment and use the following:
#CFLAGS = -q64 -qarch=ppc64 -DSYB_LP64
#CC = xlc
#DBLIBS = $(LIBDIR)/libsybdb64.a
# If building for 64-bit AIX 5.1 (SYBPLATFORM ibmaix64),
# uncomment and use the following:
#CFLAGS = -q64 -qarch=ppc64 -DSYB_LP64
#CC = /usr/vacpp/bin/xlc
#DBLIBS = $(LIBDIR)/libsybdb64.a
all: example1 example2 example3 example4 example5 example6 example7 \
example8 example9 example10 example11 example12 bulkcopy twophase
example1: $(HEADERS) example1.c
$(CC) $(CFLAGS) $(INCLUDE) example1.c $(DBLIBS) -lm -o example1
example2: $(HEADERS) example2.c
$(CC) $(CFLAGS) $(INCLUDE) example2.c $(DBLIBS) -lm -o example2
example3: $(HEADERS) example3.c
$(CC) $(CFLAGS) $(INCLUDE) example3.c $(DBLIBS) -lm -o example3
example4: $(HEADERS) example4.c
$(CC) $(CFLAGS) $(INCLUDE) example4.c $(DBLIBS) -lm -o example4
example5: $(HEADERS) example5.c
$(CC) $(CFLAGS) $(INCLUDE) example5.c $(DBLIBS) -lm -o example5
example6: $(HEADERS) example6.c
$(CC) $(CFLAGS) $(INCLUDE) example6.c $(DBLIBS) -lm -o example6
example7: $(HEADERS) example7.c
$(CC) $(CFLAGS) $(INCLUDE) example7.c $(DBLIBS) -lm -o example7
example8: $(HEADERS) example8.c
$(CC) $(CFLAGS) $(INCLUDE) example8.c $(DBLIBS) -lm -o example8
example9:$(HEADERS) example9.c
$(CC) $(CFLAGS) $(INCLUDE) example9.c $(DBLIBS) -lm -o example9
example10:example10.c
$(CC) $(CFLAGS) $(INCLUDE) example10.c $(DBLIBS) -lm -o example10
example11:example11.c
$(CC) $(CFLAGS) $(INCLUDE) example11.c $(DBLIBS) -lm -o example11
example12:example12.c
$(CC) $(CFLAGS) $(INCLUDE) example12.c $(DBLIBS) -lm -o example12
bulkcopy:bulkcopy.c
$(CC) $(CFLAGS) $(INCLUDE) bulkcopy.c $(DBLIBS) -lm -o bulkcopy
twophase:twophase.c
$(CC) $(CFLAGS) $(INCLUDE) twophase.c $(DBLIBS) -lm -o twophase
clean:
- rm -f example1 example2 example3 example4 example5 example6
- rm -f example7 example8 example9 example10 example11 example12
- rm -f bulkcopy twophase
回复 #1 badpage 的帖子
帮顶,偶也碰到了,请有经验的前辈指点指点!!!
页:
[1]