gpt4 book ai didi

Ubuntu 9.10 karmic 中的 gccgo 链接错误?

转载 作者:IT王子 更新时间:2023-10-29 01:48:30 24 4
gpt4 key购买 nike

我正在尝试使用 gccgo 编译 go 文件,我安装在我的 ubuntu 9.10 机器上。当我编译

 $gccgo -c hello.go

hello.o 文件生成,同时尝试链接并形成可执行文件

$gccgo -o 你好你好.o

我得到以下错误

 /usr/local/lib/gcc/i686-pc-linux-gnu/4.5.0/../../../libgo.so: undefined reference to `__sync_fetch_and_add_4'
/usr/local/lib/gcc/i686-pc-linux-gnu/4.5.0/../../../libgo.so: undefined reference to `__sync_bool_compare_and_swap_4'
collect2: ld returned 1 exit status

我错过了什么吗? ,我还在我的环境中设置了 LD_LIBRARY_PATH。谢谢

最佳答案

也许尝试遵循 this post 中的建议并将 -march=i486 传递给编译器? (或 -march=i686)

关于Ubuntu 9.10 karmic 中的 gccgo 链接错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1769235/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com