编译问题,引用了别人的一个库,结果编译出问题。

shockliu 2004-08-23 10:15:40
如下,在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
...全文
93 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
shockliu 2004-08-24
  • 打赏
  • 举报
回复
Linux版本的问题,在7.2下编译的库只能在相应内核下的编译中使用。
到9.0版本只能找源码重新编译库了:)
我重新安装了一个7.2的虚拟机,反正现在工作环境7.2版本够用了。
blh 2004-08-23
  • 打赏
  • 举报
回复
Where is `__ctype_b' defined?

23,121

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 应用程序开发区
社区管理员
  • 应用程序开发区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧