<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div><blockquote type="cite">It will help with debugging this to see the output of all of these:<br><br>$ echo $PATH<br>$ pwd<br>$ find . -name clang++<br>$ find . -name llvm-config<br>$ which llvm-config<br>$ which clang++<br>$ llvm-config --*cppflags* --ldflags --libs core -v<br>$ clang++ -g -O3 toy.cpp `llvm-config --cxxflags --ldflags --libs core` -o toy -v<br><br>My suspicion is that this is picking the just-built llvm-config and the clang++ is the system provided one. I think you need to use full paths to make sure you're getting *both* of the just-built ones instead.<br></blockquote><br></div><div>Hi Jon,</div><div><br></div><div>Using the following: clang++ -g -O3 toy.cpp `llvm-config --cxxflags --ldflags --libs core --system-libs` -o toy </div><div><br></div><div>I was able to compile the tutorial successfully.</div><div><br></div><div>Although I have been able to successfully compile the tutorial as I noted in another response to this thread earlier this morning, I wanted to post the output of the commands you suggest. I’m hoping to find out why I have to use apparently “special” options when compiling the tutorial. Here’s the output:</div><div><br></div><div><div style="margin: 0px;"><b>echo $PATH</b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin</div><div style="margin: 0px; min-height: 14px;"><br></div><div style="margin: 0px;"><b>pwd</b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">/Users/josephmorgan</div><div style="margin: 0px; min-height: 14px;"><br></div><div style="margin: 0px;"><b>find . -name clang++</b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">./build/Debug+Asserts/bin/clang++</div><div style="margin: 0px; min-height: 14px;"><br></div><div style="margin: 0px;"><b>find . -name llvm-config</b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">./build/Debug+Asserts/bin/clang++</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">find: ./Library/Saved Application State/com.bitrock.installbuilder.savedState: Permission denied</div><div style="margin: 0px; min-height: 14px;"><br></div><div style="margin: 0px;"><b>which llvm-config</b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">/usr/local/bin/llvm-config</div><div style="margin: 0px; min-height: 14px;"><br></div><div style="margin: 0px;"><b>which clang++</b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">/usr/bin/clang++</div><div style="margin: 0px; min-height: 14px;"><br></div><div style="margin: 0px;"><b>llvm-config --cppflags</b> </div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">-I/usr/local/include  -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS</div><div style="margin: 0px; min-height: 14px;"><br></div><div style="margin: 0px;"><b>llvm-config --ldflags</b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">-L/usr/local/lib </div><div style="margin: 0px; min-height: 14px;"><br></div><div style="margin: 0px;"><b>llvm-config --libs core</b> </div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">-lLLVMCore -lLLVMSupport</div><div style="margin: 0px; min-height: 14px;"><br></div><div style="margin: 0px;"><b>clang++ -g -O3 toy.cpp `llvm-config --cxxflags --ldflags --libs core` -o toy -v</b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">Target: x86_64-apple-darwin13.2.0</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">Thread model: posix</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"> "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.9.0 -emit-obj -disable-free -disable-llvm-verifier -main-file-name toy.cpp -mrelocation-model pic -pic-level 2 -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 224.1 -v -g -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -D _DEBUG -D _GNU_SOURCE -D __STDC_CONSTANT_MACROS -D __STDC_FORMAT_MACROS -D __STDC_LIMIT_MACROS -I /usr/local/include -stdlib=libc++ -O3 -Woverloaded-virtual -Wcast-qual -std=c++11 -fdeprecated-macro -fdebug-compilation-dir /Users/josephmorgan -ferror-limit 19 -fmessage-length 80 -fvisibility-inlines-hidden -stack-protector 1 -mstackrealign -fblocks -fno-rtti -fobjc-runtime=macosx-10.9.0 -fobjc-dispatch-method=mixed -fobjc-default-synthesize-properties -fencode-extended-block-signature -fno-common -fdiagnostics-show-option -fcolor-diagnostics -o /var/folders/tb/0bmsh_9179z57k1_hg4m36jr0000gn/T/toy-AtHsw2.o -x c++ toy.cpp</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">clang -cc1 version 5.0 based upon LLVM 3.3svn default target x86_64-apple-darwin13.2.0</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/v1"</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/local/include"</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/Library/Frameworks"</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">#include "..." search starts here:</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">#include <...> search starts here:</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"> /usr/local/include</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.0/include</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks (framework directory)</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">End of search list.</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"> "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -dynamic -arch x86_64 -macosx_version_min 10.9.0 -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -o toy -L/usr/local/lib /var/folders/tb/0bmsh_9179z57k1_hg4m36jr0000gn/T/toy-AtHsw2.o -lLLVMCore -lLLVMSupport -lc++ -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.0/lib/darwin/libclang_rt.osx.a</div><div style="margin: 0px; min-height: 14px;"><br></div><div style="margin: 0px; min-height: 14px;"><br></div><div style="margin: 0px; min-height: 14px;">Thank you,</div><div style="margin: 0px; min-height: 14px;"><br></div><div style="margin: 0px; min-height: 14px;">Joseph Morgan</div></div></body></html>