当前位置: 技术问答>linux和unix
编译问题,引用了别人的一个库,结果编译出问题。
来源: 互联网 发布时间:2015-07-18
本文导语: 如下,在Linux7.2可以编译,在 Red Hat Linux release 9 (Shrike) Kernel 2.4.20-8 on an i686 系统上编译无法通过,日志如下,请高手帮忙, 是否非得要到库的原码? [liup@liup src]$ make predeal cc -g -o ../bin/predeal predeal.c -I ...
如下,在Linux7.2可以编译,在
Red Hat Linux release 9 (Shrike)
Kernel 2.4.20-8 on an i686
系统上编译无法通过,日志如下,请高手帮忙,
是否非得要到库的原码?
[liup@liup src]$ make predeal
cc -g -o ../bin/predeal predeal.c -I ../bin -I /usr/local/bin/include -I /usr/i
nclude/eicon ./emelib.a -lnsl -lm -lc
./emelib.a(emelib.o)(.text+0x1f094): In function `GetDateTimeFromString':
: undefined reference to `__ctype_b'
./emelib.a(eseme.o)(.text+0x521): In function `CheckIPAddr':
: undefined reference to `__ctype_b'
./emelib.a(eseme.o)(.text+0x1331): In function `DecString2BCD':
: undefined reference to `__ctype_b'
./emelib.a(eseme.o)(.text+0x9a21): In function `StringHaveNum':
: undefined reference to `__ctype_b'
./emelib.a(eseme.o)(.text+0xaea2): In function `Dec2Hex':
: undefined reference to `__ctype_b'
./emelib.a(eseme.o)(.text+0xaf01): more undefined references to `__ctype_b' foll
ow
collect2: ld returned 1 exit status
make: *** [predeal] Error 1
Red Hat Linux release 9 (Shrike)
Kernel 2.4.20-8 on an i686
系统上编译无法通过,日志如下,请高手帮忙,
是否非得要到库的原码?
[liup@liup src]$ make predeal
cc -g -o ../bin/predeal predeal.c -I ../bin -I /usr/local/bin/include -I /usr/i
nclude/eicon ./emelib.a -lnsl -lm -lc
./emelib.a(emelib.o)(.text+0x1f094): In function `GetDateTimeFromString':
: undefined reference to `__ctype_b'
./emelib.a(eseme.o)(.text+0x521): In function `CheckIPAddr':
: undefined reference to `__ctype_b'
./emelib.a(eseme.o)(.text+0x1331): In function `DecString2BCD':
: undefined reference to `__ctype_b'
./emelib.a(eseme.o)(.text+0x9a21): In function `StringHaveNum':
: undefined reference to `__ctype_b'
./emelib.a(eseme.o)(.text+0xaea2): In function `Dec2Hex':
: undefined reference to `__ctype_b'
./emelib.a(eseme.o)(.text+0xaf01): more undefined references to `__ctype_b' foll
ow
collect2: ld returned 1 exit status
make: *** [predeal] Error 1
|
Where is `__ctype_b' defined?