UPCC(杂食动物)请进 (undefined referenceto'__ctype_b_loc@GLIBC_2.3')

pottichu 2007-04-02 04:53:32
undefined reference to `__ctype_b_loc'
我也遇到这个问题了.

http://topic.csdn.net/t/20050114/22/3727140.html
我看到你曾经遇到过同样的问题, 请教下是怎么解决的?

谢谢.
...全文
790 13 打赏 收藏 转发到动态 举报
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
KenYuan2016 2007-04-03
  • 打赏
  • 举报
回复
The issue here is that __ctype_b() is actually gone for __ctype_b_loc() because Red Hat uses a new locale model. However, in libc.so, __ctype_b is still exported as compatibility symbol;
KenYuan2016 2007-04-03
  • 打赏
  • 举报
回复
你以前是不是使用旧版本的GCC编译TCL的?
pottichu 2007-04-02
  • 打赏
  • 举报
回复
我估计应该是 tcl 选项中连接到了x86 的库,所以产生这个问题.
pottichu 2007-04-02
  • 打赏
  • 举报
回复
问题解决了。

./configure --host=arm-linux --disable-tcl
需要把tcl disable

undefined reference to `__ctype_b_loc' 错误就是因为 tcl 选项所引起的.
另外需要自己修改 Makefile 把 libreadline 和 libhistory 两个库加上就 OK 了。
pass86 2007-04-02
  • 打赏
  • 举报
回复
好悠久的帖子啊,UPJF
jixingzhong 2007-04-02
  • 打赏
  • 举报
回复
进来看看 ~
KenYuan2016 2007-04-02
  • 打赏
  • 举报
回复
坚持使用gcc的话,把 库加上 -lstdc++
KenYuan2016 2007-04-02
  • 打赏
  • 举报
回复
编译器要使用c++编译器 ,G++ 或者, 跟GCC版本没关系,你都到3.2.3版本了,不用升
iu_81 2007-04-02
  • 打赏
  • 举报
回复
或者
创建linuxpatch.c源文件
#include <ctype.h>
__const unsigned short int *__ctype_b;
__const __int32_t *__ctype_tolower;
__const __int32_t *__ctype_toupper;
void ctSetup()
{
__ctype_b = *(__ctype_b_loc());
__ctype_toupper = *(__ctype_toupper_loc());
__ctype_tolower = *(__ctype_tolower_loc());
}
并在.c源程序中包含,并在main()中执行
KenYuan2016 2007-04-02
  • 打赏
  • 举报
回复
使用了不同版本的库文件造成。
iu_81 2007-04-02
  • 打赏
  • 举报
回复
glibc的版本问题,升级编译工具的版本
pottichu 2007-04-02
  • 打赏
  • 举报
回复
arm-linux-gcc --version
arm-linux-gcc (GCC) 3.2.3
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


gcc --version
gcc (GCC) 3.4.3
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

会不会是 arm-linux-gcc 版本太老?
pottichu 2007-04-02
  • 打赏
  • 举报
回复
忘记说了。
我是在编译 SQLite 的时候遇到这个问题的.
在 x86 上编译没问题.
在 arm 上编译的时候出的问题, 是不是缺少了什么库?

64,637

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

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