我正在尝试使用gccgo编译go文件,这是我安装在我的ubuntu 9.10机器上的。当我编译的时候
$gccgo -c hello.go在尝试链接并形成可执行文件时,生成hello.o文件
$gccgo -o hello hello。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。谢谢
发布于 2009-11-21 03:39:19
也许可以尝试遵循 this post 中的建议,并将-march=i486传递给编译器?(或-march=i686)
https://stackoverflow.com/questions/1769235
复制相似问题