views:

68

answers:

2

Which linker do I use for clang? If I use clang or ld as a linker, I get massive amounts of errors as if I didn't link with the standard library.

g++ $(OBJS) -o $(BINDIR)/obtap

It seems I have to use g++ in order to link my clang objects.

+3  A: 

As Clang is based on LLVM, isn't it supposed to be linked using llvm-link?

Klaim
A: 

You do not have to use llvm's link editor. I will avoid getting into the technical details, but, in short, you will need to have a typical UNIX link editor available to use Clang at this time (read: GNU ld or Sun ld). Even llvm-ld uses the underlying platform's linker to link native binaries.

wash