[cfe-dev] Using more than one version of clang

Sean Silva silvas at purdue.edu
Mon Dec 31 17:09:08 PST 2012


On Mon, Dec 31, 2012 at 5:05 PM, Edward Diener
<eldlistmailingz at tropicsoft.com> wrote:
> What are the things I must do to use both versions at different times ? In
> particular how does a version of clang find its own header files and
> libaries when I invoke "clang", and what do I have to do make sure that a
> particular version of "clang" I invoke correctly finds its own header files
> and libraries for the purposes of compiling and linking ?

It finds its own headers relative to the executable that the libraries
are compiled into, but the executable must be inside a specific
directory structure. If you just build from source then the
executables produced by the build (e.g. in `Release+Asserts/bin/`) are
already in the right directory structure.

What I usually do is add the build directory's bin/ to my PATH
whenever I want to use the freshly built one, and have my default PATH
use the system one.

-- Sean Silva



More information about the cfe-dev mailing list