Hi,<br><br>I apologize if this is the wrong place to post this but I could do with some assistance. I'm working on getting LLVM and clang installed with Ubuntu  and try to compile some tutorial code from here - <a href="http://www.cs.bgu.ac.il/%7Emirskyil/CsWiki/Blogs/Post_Mirskyil_4c83cc1f85da2" rel="nofollow">http://www.cs.bgu.ac.il/~mirskyil/CsWiki/Blogs/Post_Mirskyil_4c83cc1f85da2</a><div class="post-text">


<p>I have been running into some problems when compiling using g++ and I
 would assume it is to do with the fact I have not installed something 
correctly (I am fairly new to this stuff).</p>

<p>When I attempt to execute this command - </p>

<pre><code>g++ tut.cpp -g -o tut.out \
`$LLVM/Debug+Asserts/bin/llvm-config --cxxflags` \
-I$LLVM/tools/clang/include/ \
-lclangFrontendTool -lclangFrontend -lclangDriver -lclangSerialization \
-lclangCodeGen -lclangParse -lclangSema -lclangChecker -lclangAnalysis \
-lclangIndex -lclangRewrite -lclangAST -lclangLex -lclangBasic \
`$LLVM/Debug+Asserts/bin/llvm-config --ldflags --libs`
</code></pre>

<p>I receive the following errors - </p>

<pre><code>/home/rob/llvm/include/llvm/Support/DataTypes.h:45:3: error: #error "Must #define      __STDC_LIMIT_MACROS before #including System/DataTypes.h"

/home/rob/llvm/include/llvm/Support/DataTypes.h:49:3: error: #error "Must #define __STDC_CONSTANT_MACROS before " "#including System/DataTypes.h"

In file included from /llvm/tools/clang/include/clang/AST/Decl.h:17:0,
                 from /llvm/tools/clang/include/clang/AST/ASTContext.h:23,
                 from tut.cpp:3:
/llvm/tools/clang/include/clang/AST/APValue.h:18:29: fatal error: llvm/ADT/APSInt.h: No such file or directory
compilation terminated.
</code></pre>

<p>I assume the first error about __STDC_LIMIT_MACROS is I haven't 
defined something in the command line, but the other error is to do with
 file includes. It seems that the code is trying to look into 
'llvm/APT/APSInt.h' which does not exist, I can manually change these 
paths to work but it seems like I have done something wrong. </p>

<p>If anyone can point me in the right direction it would be greatly appreciated.</p><p></p><p>Thanks,</p><p>Laurence<br></p><p><br></p>

    </div>