如何解决未定义的参考

发布于 2025-01-20 03:42:47 字数 159 浏览 2 评论 0原文

当我用GCC编译器编译C程序时,出现如下问题:

AppData\Local\Temp\ccGGIeQR.o:bst.c:(.text+0x81): undefined reference to `BiTree_NextOrder' collect2.exe:错误:ld 返回 1 退出状态

when I was compiling a C program by GCC compiler, a problems occured as follows:

AppData\Local\Temp\ccGGIeQR.o:bst.c:(.text+0x81): undefined reference to `BiTree_NextOrder'
collect2.exe: error: ld returned 1 exit status

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

明月夜 2025-01-27 03:42:47

该错误意味着您的文件 ccGGIeQR.o:bst.c 使用 BiTree_NextOrder (可能是一个函数),但未找到 BiTree_NextOrder 的实现当您尝试链接您的程序时。您必须找到 BiTree_NextOrder 并在相应的对象文件或库中找到链接:

gcc ccGGIeQR.o:bst.o BiTree_NextOrder.o -o your_program
gcc ccGGIeQR.o:bst.o -o your_program -lBiTree # perhaps?

The error means that your file ccGGIeQR.o:bst.c uses BiTree_NextOrder (probably a function), but the implementation of BiTree_NextOrder was not found when you tried to link your program. You have to locate BiTree_NextOrder and either link in the corresponding object file or library:

gcc ccGGIeQR.o:bst.o BiTree_NextOrder.o -o your_program
gcc ccGGIeQR.o:bst.o -o your_program -lBiTree # perhaps?
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文