0

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: linker command failed with exit code 1 (use -v to see invocation)

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.