[cfe-dev] Clang library documentation

Fletcher, John P j.p.fletcher at aston.ac.uk
Wed Apr 20 12:02:09 PDT 2011


Eli

Thank you.

I should explain my reason a bit more.  I wanted to document the version of Clang in my code.
I found this was in the header clang/Basic/Version.h and put that into my code.
I found a routine there called  getClangFullVersion() which I called in my code.
I then need to link a library for it which is -lclangBasic but that is not enough.
As well I need -lLLVMSupport -lpthread -ldl to avoid linker errors.
All this I have found by trial and error.

Is there documentation about which LLVM library does which to link a Clang program?

Thank you

John
________________________________________
From: Eli Friedman [eli.friedman at gmail.com]
Sent: 20 April 2011 17:24
To: Fletcher, John P
Cc: cfe-dev at cs.uiuc.edu
Subject: Re: [cfe-dev] Clang library documentation

On Wed, Apr 20, 2011 at 6:31 AM, Fletcher, John P
<j.p.fletcher at aston.ac.uk> wrote:
> Is there any documentation about which libraries are to be used to link
> executables for Clang?

If you run clang with --verbose, you can see exactly how clang invokes
the linker.

-Eli




More information about the cfe-dev mailing list