[LLVMdev] The first two lines of llvm tutorial don't compile.

Hendrik Boom hendrik at topoi.pooq.com
Mon Jun 2 09:43:46 PDT 2008


I took the first two lines of the sample program in the tutorial:


hendrik at lovesong:~/dv/lang/hlvm$ cat broken.cpp 
#include "llvm/DerivedTypes.h"
#include "llvm/Module.h"
hendrik at lovesong:~/dv/lang/hlvm$


and tried to compile them using the llvm-dev in Debian testing:


hendrik at lovesong:~/dv/lang/hlvm$ g++ -o broken.o -c broken.cpp
In file included from /usr/include/llvm/Type.h:16,
                 from /usr/include/llvm/DerivedTypes.h:21,
                 from broken.cpp:1:
/usr/include/llvm/Support/DataTypes.h:38:3: error: #error "Must #define __STDC_LIMIT_MACROS before #including Support/DataTypes.h"
hendrik at lovesong:~/dv/lang/hlvm$


Did I do something wrong, or is something broken? In llvm or in g++?


hendrik at lovesong:~/dv/lang/hlvm$ g++ --version
g++ (GCC) 4.2.4 (Debian 4.2.4-1)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

hendrik at lovesong:~/dv/lang/hlvm$ 



-- hendrik






More information about the llvm-dev mailing list