including llvm headers in the sample project

When building an llvm project, I followed the steps outlined here: http://llvm.org/docs/Projects.html and copied the sample project from /projects/sample.

This compiles just fine. However, when I try to include llvm headers, compilation fails with the error:

In file included from /home/eks/projects/cfg/tools/cfg/main.c:9:
In file included from /home/eks/projects/llvm/llvm-svn/include/llvm/Module.h:18:
In file included from /home/eks/projects/llvm/llvm-svn/include/llvm/Function.h:21:
In file included from /home/eks/projects/llvm/llvm-svn/include/llvm/GlobalValue.h:21:
In file included from /home/eks/projects/llvm/llvm-svn/include/llvm/Constant.h:17:
In file included from /home/eks/projects/llvm/llvm-svn/include/llvm/User.h:22:
In file included from /home/eks/projects/llvm/llvm-svn/include/llvm/Support/ErrorHandling.h:19:
In file included from /home/eks/projects/llvm/llvm-svn/include/llvm/ADT/StringRef.h:13:
/home/eks/projects/llvm/llvm-svn/include/llvm/Support/type_traits.h:21:10: fatal error: ‘cstddef’ file not found
#include

It seems that when trying to include llvm headers, compilation always fails, citing various missing c++ system headers.

How does one include llvm headers in the sample project without running in to this problem?

also, is autoconf really the best way to be building llvm projects? It seems like most projects use cmake instead, but I wasn’t able to find llvm documentation for setting up a sample project with cmake.

thanks!