<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<div><br></div><div>Is it possible to run Objective-C code in lli? lli does not seem to want to load Foundation.framework.</div><div><br></div><div>Please see below.</div><div><br></div><div>Thanks,</div><div><br></div><div>Eric Brunstad</div><div><br></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(209, 38, 34); "><span style="color: #78482d">#import </span><Foundation/Foundation.h></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; min-height: 13px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span style="color: #bc24a0">int</span> main(<span style="color: #bc24a0">int</span> argc, <span style="color: #bc24a0">char</span> *argv[])</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">{</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"> </span>NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"> </span>NSLog(<span style="color: #d12622">@"test!"</span>);</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"> </span>[pool drain];</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"> </span><span style="color: #bc24a0">return</span> EXIT_SUCCESS;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">}</div></div><div><br></div><div>cmu-351714:llvm-2.5 ericbrunstad$ /Users/ericbrunstad/Downloads/llvm-2.5/Release/bin/lli -force-interpreter=true -stats /Users/ericbrunstad/Desktop/test/test.o -load=/System/Library/Frameworks/Foundation.framework/Foundation<br></div><div><br></div><div>Could not resolve external global address: __CFConstantStringClassReference<br>0 lli 0x0000000100687556 (anonymous namespace)::SignalHandler(int) + 470<br>1 libSystem.B.dylib 0x00007fff83ee10aa _sigtramp + 26<br>2 libSystem.B.dylib 0x0000000100a0b4ba _sigtramp + 2092082218<br>3 lli 0x00000001001e8374 llvm::ExecutionEngine::emitGlobals() + 6164<br>4 lli 0x00000001001dbd69 llvm::Interpreter::Interpreter(llvm::ModuleProvider*) + 185<br>5 lli 0x00000001001dbdd8 llvm::Interpreter::create(llvm::ModuleProvider*, std::string*, bool) + 56<br>6 lli 0x0000000100010803 main + 243<br>7 lli 0x00000001000106e8 start + 52<br><br></div></body></html>