当我尝试运行 clang 作为我的 C 编译器时,出现错误(我认为是链接器错误)
Compilation started at Sun Nov 11 14:34:55
make -k
clang -std=c99 -ggdb -o0 -Wall -Werror helloworld.c -o helloworld
clang: warning: unknown platform, assuming -mfloat-abi=soft
/usr/bin/ld: cannot find crt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [helloworld] Error 1
Compilation exited abnormally with code 2 at Sun Nov 11 14:34:56
实际上,我重新安装了 Raspbian 镜像,以为问题会消失,但问题仍然存在。 Raspbian版本是最新的Raspbian Wheezy硬浮点ABI(2012-10-28)。
最佳答案
正如您基本上已经发现的那样,安装的 clang 已无法使用地损坏。如果您通过包管理器安装了它,请向分发该包的人提示,因为他们显然没有费心测试它。
关于linux - Raspberry Pi/Raspbian 上的 Clang 错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13334813/