[LLVMdev] LLVM show error preprocessor "Must #define __STDC_LIMIT_MACROS before #including Support/DataTypes.h"
Peter Collingbourne
peter at pcc.me.uk
Sun Apr 8 18:12:24 PDT 2012
On Sun, Apr 08, 2012 at 10:19:40PM +0700, Chatsiri Ratana wrote:
> Hello All,
>
> I build source code of Ocelot[http://code.google.com/p/gpuocelot/]. It
> using LLVM dependency of Ocelot. llvm-config get cppflags represent as
> below in order to build with Ocelot.
>
> ./llvm-config --cppflags
> -I/home/chatsiri/workspacecpp/llvm/include
> -I/home/chatsiri/workspacecpp/llvm/include -D_DEBUG -D_GNU_SOURCE
> -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
>
> Why DataType.h line 49 through error as #error "Must #define
> __STDC_LIMIT_MACROS before #including Support/DataTypes.h"
>
> g++ -o .release_build/ocelot/ir/implementation/ExternalFunctionSet.os -c
> -O2 -Wall -Werror -std=c++0x "-I/home/chatsiri/workspacecpp/llvm/include
> -I/home/chatsiri/workspacecpp/llvm/include -D_DEBUG -D_GNU_SOURCE
> -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS"
I suspect it is because this part of your command line is in quotation
marks. If you remove the quotation marks you should be fine.
Thanks,
--
Peter
More information about the llvm-dev
mailing list