Using Clang: Cannot Find Standard C++ Library

When I use clang as the linker to link a C++ program, it complains cannot find standard symbols like std::cout. But if I use clang++ as the linker, it works. However, on both Ubuntu and Mac OS X, clang++ is just a symbolic link to clang! I guess when clang runs, it checks the name in which it was started and work accordingly.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.