[LLVMdev] LLVM show error preprocessor "Must #define __STDC_LIMIT_MACROS before #including Support/DataTypes.h"

Chatsiri Ratana insiderboy at gmail.com
Sun Apr 8 08:19:40 PDT 2012


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"
-fPIC -I. -I/home/chatsiri/workspacecpp/boost-truck
-I.release_build/:/home/chatsiri/workspacecpp/glew-1.7.0/include
-I:/home/chatsiri/workspacecpp/glew-1.7.0/include
-I/home/chatsiri/workspacecpp/glew-1.7.0/include
-I/home/chatsiri/workspacecpp/llvm/include -I.release_build -I.
ocelot/ir/implementation/ExternalFunctionSet.cpp
In file included from
/home/chatsiri/workspacecpp/llvm/include/llvm/Support/type_traits.h:20,
                 from
/home/chatsiri/workspacecpp/llvm/include/llvm/ADT/StringRef.h:13,
                 from
/home/chatsiri/workspacecpp/llvm/include/llvm/PassRegistry.h:20,
                 from
/home/chatsiri/workspacecpp/llvm/include/llvm/PassSupport.h:25,
                 from
/home/chatsiri/workspacecpp/llvm/include/llvm/Pass.h:372,
                 from
/home/chatsiri/workspacecpp/llvm/include/llvm/PassManager.h:20,
                 from ocelot/ir/implementation/ExternalFunctionSet.cpp:26:
/home/chatsiri/workspacecpp/llvm/include/llvm/Support/DataTypes.h:49:
error: #error "Must #define __STDC_LIMIT_MACROS before #including
Support/DataTypes.h"
/home/chatsiri/workspacecpp/llvm/include/llvm/Support/DataTypes.h:53:
error: #error "Must #define __STDC_CONSTANT_MACROS before " "#including
Support/DataTypes.h"
scons: *** [.release_build/ocelot/ir/implementation/ExternalFunctionSet.os]
Error 1
Build failed

Best Regards,
Chatsiri Rattana



-- 
:--------------------------------------------------------
http://about.me/chatsiri.ratana
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120408/34e66607/attachment.html>


More information about the llvm-dev mailing list