<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><span>OK.  Thanks.  I now get the following error (which appears to be a problem w/ the tutorial itself?):</span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><span><br></span></div><div><span><div>$ /home/ubuntu/bin/bin/clang++ -I /home/ubuntu/bin/include/  -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS tutorial1.cpp/tmp/tutorial1-LQ71fW.o: In function `main':</div><div>tutorial1.cpp:(.text+0x42): undefined reference to `llvm::outs()'</div><div>tutorial1.cpp:(.text+0x72): undefined reference to `clang::TextDiagnosticPrinter::TextDiagnosticPrinter(llvm::raw_ostream&, clang::DiagnosticOptions const&, bool)'</div><div>tutorial1.cpp:(.text+0xd7): undefined reference to
 `clang::DiagnosticsEngine::DiagnosticsEngine(llvm::IntrusiveRefCntPtr<clang::DiagnosticIDs> const&, clang::DiagnosticConsumer*, bool)'</div><div>tutorial1.cpp:(.text+0xf4): undefined reference to `clang::LangOptions::LangOptions()'</div><div>tutorial1.cpp:(.text+0x125): undefined reference to `clang::FileManager::FileManager(clang::FileSystemOptions const&)'</div><div>tutorial1.cpp:(.text+0x148): undefined reference to `clang::SourceManager::SourceManager(clang::DiagnosticsEngine&, clang::FileManager&)'</div><div>tutorial1.cpp:(.text+0x17c): undefined reference to `llvm::sys::getDefaultTargetTriple()'</div><div>tutorial1.cpp:(.text+0x1d0): undefined reference to `clang::TargetInfo::CreateTargetInfo(clang::DiagnosticsEngine&, clang::TargetOptions&)'</div><div>tutorial1.cpp:(.text+0x211): undefined reference to `clang::HeaderSearch::HeaderSearch(clang::FileManager&, clang::DiagnosticsEngine&, clang::LangOptions
 const&, clang::TargetInfo const*)'</div><div>tutorial1.cpp:(.text+0x225): undefined reference to `clang::CompilerInstance::CompilerInstance()'</div><div>tutorial1.cpp:(.text+0x288): undefined reference to `clang::Preprocessor::Preprocessor(clang::DiagnosticsEngine&, clang::LangOptions&, clang::TargetInfo const*, clang::SourceManager&, clang::HeaderSearch&, clang::ModuleLoader&, clang::IdentifierInfoLookup*, bool, bool, bool)'</div><div>tutorial1.cpp:(.text+0x2ad): undefined reference to `clang::Preprocessor::~Preprocessor()'</div><div>tutorial1.cpp:(.text+0x370): undefined reference to `clang::CompilerInstance::~CompilerInstance()'</div><div>tutorial1.cpp:(.text+0x384): undefined reference to `clang::CompilerInstance::~CompilerInstance()'</div><div>tutorial1.cpp:(.text+0x398): undefined reference to `clang::HeaderSearch::~HeaderSearch()'</div><div>tutorial1.cpp:(.text+0x3c5): undefined reference to
 `clang::HeaderSearch::~HeaderSearch()'</div><div>tutorial1.cpp:(.text+0x3de): undefined reference to `clang::SourceManager::~SourceManager()'</div><div>tutorial1.cpp:(.text+0x40b): undefined reference to `clang::FileManager::~FileManager()'</div><div>tutorial1.cpp:(.text+0x41f): undefined reference to `clang::SourceManager::~SourceManager()'</div><div>tutorial1.cpp:(.text+0x44c): undefined reference to `clang::FileManager::~FileManager()'</div><div>/tmp/tutorial1-LQ71fW.o: In function `llvm::RefCountedBase<clang::DiagnosticIDs>::Release() const':</div><div>tutorial1.cpp:(.text._ZNK4llvm14RefCountedBaseIN5clang13DiagnosticIDsEE7ReleaseEv[_ZNK4llvm14RefCountedBaseIN5clang13DiagnosticIDsEE7ReleaseEv]+0x88): undefined reference to `clang::DiagnosticIDs::~DiagnosticIDs()'</div><div>clang-3: error: linker command failed with exit code 1 (use -v to see invocation)</div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;
 "><br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div></span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div>  <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1">  <b><span style="font-weight:bold;">From:</span></b> Ashok Nalkund <ashoknn@qualcomm.com><br> <b><span style="font-weight: bold;">To:</span></b> NY Knicks Fan <nyknicksfan92009@yahoo.com> <br><b><span style="font-weight: bold;">Cc:</span></b> "llvmdev@cs.uiuc.edu" <llvmdev@cs.uiuc.edu> <br> <b><span style="font-weight: bold;">Sent:</span></b> Tuesday, July 10, 2012 11:28 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [LLVMdev] Unable to do even basic Clang
 tutorial<br> </font> </div> <br>Add -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS to your compilation flag.<br><br>On 7/10/2012 11:23 AM, NY Knicks Fan wrote:<br>> Hi Ashok,<br>><br>> I created a new Ubuntu 12.04 virtual machine and followed directions<br>> except that I know use your cmake command instead of configure, and I<br>> got the error below.<br>><br>> Any help is very much appreciated.<br>><br>><br>> $ /home/ubuntu/bin/bin/clang++ -I /home/ubuntu/bin/include/ tutorial1.cpp<br>> In file included from tutorial1.cpp:5:<br>> In file included from<br>> /home/ubuntu/bin/include/llvm/Support/raw_ostream.h:17:<br>> In file included from /home/ubuntu/bin/include/llvm/ADT/StringRef.h:13:<br>> In file included from<br>> /home/ubuntu/bin/include/llvm/Support/type_traits.h:20:<br>> /home/ubuntu/bin/include/llvm/Support/DataTypes.h:48:3: error: "Must<br>> #define __STDC_LIMIT_MACROS before
 #including<br>>        Support/DataTypes.h"<br>> # error "Must #define __STDC_LIMIT_MACROS before #including<br>> Support/DataTypes.h"<br>>    ^<br>> /home/ubuntu/bin/include/llvm/Support/DataTypes.h:52:3: error: "Must<br>> #define __STDC_CONSTANT_MACROS before "<br>>    "#including Support/DataTypes.h"<br>> # error "Must #define __STDC_CONSTANT_MACROS before " \<br>>    ^<br>> In file included from tutorial1.cpp:6:<br>> In file included from /home/ubuntu/bin/include/llvm/Support/Host.h:17:<br>> In file included from /home/ubuntu/bin/include/llvm/ADT/StringMap.h:18:<br>> In file included from /home/ubuntu/bin/include/llvm/Support/Allocator.h:18:<br>> /home/ubuntu/bin/include/llvm/Support/MathExtras.h:38:24: error: use of<br>> undeclared identifier 'INT64_C'<br>>    return N >= 64 || (-(INT64_C(1)<<(N-1)) <= x && x <
 (INT64_C(1)<<(N-1)));<br>>                         ^<br>> /home/ubuntu/bin/include/llvm/Support/MathExtras.h:38:56: error: use of<br>> undeclared identifier 'INT64_C'<br>>    return N >= 64 || (-(INT64_C(1)<<(N-1)) <= x && x < (INT64_C(1)<<(N-1)));<br>>                                                         ^<br>> /home/ubuntu/bin/include/llvm/Support/MathExtras.h:64:26: error: use of<br>> undeclared identifier 'UINT64_C'<br>>    return N >= 64 || x < (UINT64_C(1)<<N);<br>>                           ^<br>> /home/ubuntu/bin/include/llvm/Support/MathExtras.h:96:24: error: use of<br>> undeclared
 identifier 'INT64_C'<br>>    return N >= 64 || (-(INT64_C(1)<<(N-1)) <= x && x < (INT64_C(1)<<(N-1)));<br>>                         ^<br>> /home/ubuntu/bin/include/llvm/Support/MathExtras.h:96:56: error: use of<br>> undeclared identifier 'INT64_C'<br>>    return N >= 64 || (-(INT64_C(1)<<(N-1)) <= x && x < (INT64_C(1)<<(N-1)));<br>>                                                         ^<br>> 7 errors generated.<br>><br>><br>> ------------------------------------------------------------------------<br>> *From:* Ashok Nalkund <<a ymailto="mailto:ashoknn@qualcomm.com" href="mailto:ashoknn@qualcomm.com">ashoknn@qualcomm.com</a>><br>> *To:*
 NY Knicks Fan <<a ymailto="mailto:nyknicksfan92009@yahoo.com" href="mailto:nyknicksfan92009@yahoo.com">nyknicksfan92009@yahoo.com</a>><br>> *Cc:* "<a ymailto="mailto:llvmdev@cs.uiuc.edu" href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a>" <<a ymailto="mailto:llvmdev@cs.uiuc.edu" href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a>><br>> *Sent:* Tuesday, July 10, 2012 12:44 AM<br>> *Subject:* Re: [LLVMdev] Unable to do even basic Clang tutorial<br>><br>> Looks like your make/install is incomplete wrt clang. I follow the<br>> instuctions for checking out the sources but build using cmake instead<br>> of configure:<br>><br>>  > cmake -G ""Unix Makefiles" -DLLVM_TARGETS_TO_BUILD="X86"<br>> -DCMAKE_BUILD_TYPE="Release" -DCMAKE_INSTALL_PREFIX="../bin" ../llvm<br>>  > make install<br>><br>> This builds and installs llvm+clang in the bin directory one level above<br>> llvm. I
 tried using configure earlier but had some problems.<br>><br>> ashok<br>><br>><br>> On 7/9/2012 5:32 PM, NY Knicks Fan wrote:<br>>  > Hi Ashok,<br>>  ><br>>  > As I mentioned in my earlier e-mail, my /usr/local/include does not have<br>>  > clang/ or clang-c/.<br>>  ><br>>  > I'm unable to do a make or make install in the Clang build directory.<br>>  >  How do I fix this?<br>>  ><br>>  > Thanks!<br>>  ><br>>  > ------------------------------------------------------------------------<br>>  > *From:* Ashok Nalkund <<a ymailto="mailto:ashoknn@qualcomm.com" href="mailto:ashoknn@qualcomm.com">ashoknn@qualcomm.com</a><br>> <mailto:<a ymailto="mailto:ashoknn@qualcomm.com" href="mailto:ashoknn@qualcomm.com">ashoknn@qualcomm.com</a>>><br>>  > *To:* NY Knicks Fan <<a
 ymailto="mailto:nyknicksfan92009@yahoo.com" href="mailto:nyknicksfan92009@yahoo.com">nyknicksfan92009@yahoo.com</a><br>> <mailto:<a ymailto="mailto:nyknicksfan92009@yahoo.com" href="mailto:nyknicksfan92009@yahoo.com">nyknicksfan92009@yahoo.com</a>>>; "<a ymailto="mailto:llvmdev@cs.uiuc.edu" href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a><br>> <mailto:<a ymailto="mailto:llvmdev@cs.uiuc.edu" href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a>>"<br>>  > <<a ymailto="mailto:llvmdev@cs.uiuc.edu" href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a> <mailto:<a ymailto="mailto:llvmdev@cs.uiuc.edu" href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a>>><br>>  > *Sent:* Monday, July 9, 2012 3:30 PM<br>>  > *Subject:* Re: [LLVMdev] Unable to do even basic Clang tutorial<br>>  ><br>>  > Use the -I<install path>/include .<br>> 
 ><br>>  > This directory <install path>/include should look something like:<br>>  ><br>>  > clang/  clang-c/  llvm/  llvm-c/<br>>  ><br>>  > HTH<br>>  > ashok<br>>  ><br>>  > On 7/9/2012 3:15 PM, NY Knicks Fan wrote:<br>>  >  > I downloaded the 3.1 LLVM and Clang sources.<br>>  > ><br>>  >  > I followed the directions at: <a href="http://clang.llvm.org/get_started.html" target="_blank">http://clang.llvm.org/get_started.html</a><br>>  >  ><br>>  >  > I am able to use Clang to compile stuff, but I could already do that<br>>  >  > with GCC.<br>>  >  ><br>>  >  > I'm trying to use Clang for parsing code, but I can't even get<br>> started.<br>>  >  ><br>>  >  >
 Can you tell me how to "include the installed location ofclang/llvm<br>>  >  > headers directories in your include path"?<br>>  >  ><br>>  >  > Thanks!<br>>  >  ><br>>  >  ><br>>  >  ><br>> ------------------------------------------------------------------------<br>>  >  > *From:* Ashok Nalkund <<a ymailto="mailto:ashoknn@qualcomm.com" href="mailto:ashoknn@qualcomm.com">ashoknn@qualcomm.com</a><br>> <mailto:<a ymailto="mailto:ashoknn@qualcomm.com" href="mailto:ashoknn@qualcomm.com">ashoknn@qualcomm.com</a>><br>>  > <mailto:<a ymailto="mailto:ashoknn@qualcomm.com" href="mailto:ashoknn@qualcomm.com">ashoknn@qualcomm.com</a> <mailto:<a ymailto="mailto:ashoknn@qualcomm.com" href="mailto:ashoknn@qualcomm.com">ashoknn@qualcomm.com</a>>>><br>>  >  > *To:* NY Knicks Fan
 <<a ymailto="mailto:nyknicksfan92009@yahoo.com" href="mailto:nyknicksfan92009@yahoo.com">nyknicksfan92009@yahoo.com</a><br>> <mailto:<a ymailto="mailto:nyknicksfan92009@yahoo.com" href="mailto:nyknicksfan92009@yahoo.com">nyknicksfan92009@yahoo.com</a>><br>>  > <mailto:<a ymailto="mailto:nyknicksfan92009@yahoo.com" href="mailto:nyknicksfan92009@yahoo.com">nyknicksfan92009@yahoo.com</a> <mailto:<a ymailto="mailto:nyknicksfan92009@yahoo.com" href="mailto:nyknicksfan92009@yahoo.com">nyknicksfan92009@yahoo.com</a>>>><br>>  >  > *Cc:* Chad Rosier <<a ymailto="mailto:mcrosier@apple.com" href="mailto:mcrosier@apple.com">mcrosier@apple.com</a> <mailto:<a ymailto="mailto:mcrosier@apple.com" href="mailto:mcrosier@apple.com">mcrosier@apple.com</a>><br>> <mailto:<a ymailto="mailto:mcrosier@apple.com" href="mailto:mcrosier@apple.com">mcrosier@apple.com</a> <mailto:<a
 ymailto="mailto:mcrosier@apple.com" href="mailto:mcrosier@apple.com">mcrosier@apple.com</a>>>>;<br>>  > "<a ymailto="mailto:llvmdev@cs.uiuc.edu" href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a> <mailto:<a ymailto="mailto:llvmdev@cs.uiuc.edu" href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a>><br>> <mailto:<a ymailto="mailto:llvmdev@cs.uiuc.edu" href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a> <mailto:<a ymailto="mailto:llvmdev@cs.uiuc.edu" href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a>>>"<br>>  >  > <<a ymailto="mailto:llvmdev@cs.uiuc.edu" href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a> <mailto:<a ymailto="mailto:llvmdev@cs.uiuc.edu" href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a>><br>> <mailto:<a ymailto="mailto:llvmdev@cs.uiuc.edu" href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a> <mailto:<a
 ymailto="mailto:llvmdev@cs.uiuc.edu" href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a>>>><br>>  >  > *Sent:* Monday, July 9, 2012 2:39 PM<br>>  >  > *Subject:* Re: [LLVMdev] Unable to do even basic Clang tutorial<br>>  >  ><br>>  >  > On 7/9/2012 1:42 PM, Chad Rosier wrote:<br>>  >  >  > Have you looked here: <a href="http://clang.llvm.org/get_started.html" target="_blank">http://clang.llvm.org/get_started.html</a><br>>  >  >  ><br>>  >  >  >  Chad<br>>  >  >  ><br>>  >  >  ><br>>  >  >  > On Jul 9, 2012, at 11:33 AM, NY Knicks Fan wrote:<br>>  >  >  ><br>>  >  >  >> I'm trying to do the tutorials at:<br>>  >  > 
 >><br>>  >  >  >> <a href="https://github.com/loarabia/Clang-tu...i/TutorialOrig" target="_blank">https://github.com/loarabia/Clang-tu...i/TutorialOrig</a><br>>  >  >  >> <<a href="https://github.com/loarabia/Clang-tutorial/wiki/TutorialOrig" target="_blank">https://github.com/loarabia/Clang-tutorial/wiki/TutorialOrig</a>><br>>  >  >  >><br>>  >  >  >> and I can't even do the first tutorial. I installed LLVM 3.1 and<br>>  > Clang<br>>  >  >  >> 3.1 and when I do:<br>>  >  > >><br>>  >  >  >> ~/loarabia-Clang-tutorial-3d79443$ clang++ tutorial1.cpp In file<br>>  >  >  >> included from tutorial1.cpp:5: In file included from<br>>  >  >  >>
 ./llvm/Support/raw_ostream.h:17:<br>>  >  >  >> ./llvm/Support/llvm/ADT/StringRef.h:13:10: fatal error:<br>>  >  >  >> 'llvm/Support/type_traits.h' file not found<br>>  >  >  >><br>>  >  >  >> include "llvm/Support/type_traits.h"<br>>  >  >  >> ^<br>>  >  >  >> 1 error generated.<br>>  >  >  >><br>>  >  >  >> Do you know what I am doing wrong? I'm not sure what is the<br>> best way<br>>  >  >  >> to handle this header file problem.<br>>  >  >  >><br>>  >  >  >> I'm running Ubuntu 12.04.<br>>  >  >  >><br>>  >  >  >> Thank you.<br>>  > 
 ><br>>  >  > Did you build it or "install" it from a package? If you build it, then<br>>  >  > you need do a 'make install' and include the installed location of<br>>  >  > clang/llvm headers directories in your include path.<br>>  >  ><br>>  >  ><br>>  >  ><br>>  >  ><br>>  >  ><br>>  > ><br>>  >  > _______________________________________________<br>>  >  > LLVM Developers mailing list<br>>  >  > <a ymailto="mailto:LLVMdev@cs.uiuc.edu" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <mailto:<a ymailto="mailto:LLVMdev@cs.uiuc.edu" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>><br>> <mailto:<a ymailto="mailto:LLVMdev@cs.uiuc.edu" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>
 <mailto:<a ymailto="mailto:LLVMdev@cs.uiuc.edu" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>>><br>>  > <a href="http://llvm.cs.uiuc.edu/" target="_blank">http://llvm.cs.uiuc.edu</a> <<a href="http://llvm.cs.uiuc.edu/" target="_blank">http://llvm.cs.uiuc.edu/</a>><br>>  >  > <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>>  >  ><br>>  ><br>>  ><br>>  ><br>><br>><br>><br><br><br><br> </div> </div>  </div></body></html>