对“__ctype_b_loc”的未定义引用ETC
我正在为嵌入式设备编译curl,并得到:
main.c:(.text+0x375c): undefined reference to __strdup' main.c:(.text+0x3818): 对 __ctype_b_loc' 的未定义引用 __fxstat64 等
我尝试过各种 -lc 等。
从一些研究来看,似乎可能与旧版本(__ctype_b)混淆。 我还怀疑 C 和 C++ 之间的混淆。
(这些来自使用builtools(配置)生成的makefile,以及相当多的源文件。
I am compiling curl for an embedded device, and get:
main.c:(.text+0x375c): undefined reference to __strdup'
__ctype_b_loc'
main.c:(.text+0x3818): undefined reference to
__fxstat64 etc
I have tried varied -lc etc.
From some research it seems there can be a mixup with older versions (__ctype_b).
I also suspect a mixup between C and C++.
(These are from makefiles generated with builtools (configure), and quite a lot of sourcefiles.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这看起来像是一个损坏的交叉编译器设置。这些符号(函数)通常由您的 libc 提供。
用户经常成功地构建了curl 交叉编译,这暗示该问题可能存在于您的环境中而不是curl 中。假设您为此使用了相当现代的卷曲版本。
如果事情不断被破坏,请考虑使用curl库邮件列表直接从libcurl黑客那里获得帮助。
That looks like a broken cross-compiler setup. Those symbols (functions) are typically provided by your libc.
curl is frequently successfully built cross-compiled by users, which would be a hint that this problem may be in your environment and not in curl. Assuming you use a decently modern curl version for this.
If things keep being broken, consider using the curl-library mailing list to get help from the libcurl hackers directly.