开发者

clang: error: linker command failed with exit code 1 (use -v to see invocation)

I am new to LLVM. I am using Clang 3.0 to execute c programs. I am using mandriva spring 2010. GCC version 4.4.1 is installed in the system. I used the following link to install LLVM.

svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm

I run it by using the below command

clang file.c.

I am getting the following error.

/usr/bin/ld: cannot find -lgcc
clang: error: 开发者_Python百科linker command failed with exit code 1 (use -v to see invocation)


Right now clang only has hardcoded paths to your system libraries (different linux distors are pretty different wrt this). This error means that it does not know your distribution and thus cannot infer the necessary stuff.

You have to patch clang sources and provide the necessary paths. Alternatively, you can just pass -L option with the appropriate directory in the cmdline.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜