[LLVMdev] CLANG examples are not working

Dan Liew dan at su-root.co.uk
Tue Sep 23 15:52:33 PDT 2014


> All the commands like clang++ lli, llc, llvm-config are working fine but
> when I try to compile any of the examples provided in llvm/examples folder,
> I received alot of compilation errorsl
> Errors are like
> verifier.h file not found
> nullptr is undefined

I presume you're talking about these examples [1]?

These are meant to be built by LLVM's build system. The errors you are
seeing as due to include paths not being set and not requesting C++11
support which will happen if you try to build these by hand and don't
know how the build system normally builds the programs

For CMake there is a cmake cache variable you can set to get the examples built

$ cmake -DLLVM_BUILD_EXAMPLES:BOOL=ON ../llvm
$ make -j<N>

[1] https://github.com/llvm-mirror/llvm/tree/master/examples

-- 
Dan Liew
PhD Student - Imperial College London



More information about the llvm-dev mailing list