<div>I think you need to tell lli which shared libraries to load, via "-load option," in order to find missing symbols -- probably libcmt in this case, since that's what you passed to link in the llc example.</div><div><br></div><div>hth...</div><div>Don</div><div><br><div class="gmail_quote"><div>On Fri, Feb 24, 2017 at 9:02 PM jmiguel hernandez via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_msg"><div class="gmail_default gmail_msg"><div class="gmail_default gmail_msg"><font face="courier new, monospace" class="gmail_msg">Hi</font></div><div class="gmail_default gmail_msg"><font face="courier new, monospace" class="gmail_msg">i am wondering if someone could give me some tips on how to debug/solve this problem. I am trying to use LLI on Windows. I build llvm and clang using cmake. </font></div><div class="gmail_default gmail_msg"><font face="courier new, monospace" class="gmail_msg"><br class="gmail_msg"></font></div><div class="gmail_default gmail_msg"><font face="courier new, monospace" class="gmail_msg">clang -c hello.c -emit-llvm -o hello.bc</font><br class="gmail_msg"></div><div class="gmail_default gmail_msg"><font face="courier new, monospace" class="gmail_msg">lli hello.bc<br class="gmail_msg"></font></div><div class="gmail_default gmail_msg"><div class="gmail_default gmail_msg" style="font-family:"courier new",monospace">D:\llvm\examples\helloworld>lli hello.bc</div><div class="gmail_default gmail_msg" style="font-family:"courier new",monospace">LLVM ERROR: Program used external function '___stdio_common_vsprintf' which could not be resolved!</div><div class="gmail_default gmail_msg" style="font-family:"courier new",monospace"><br class="gmail_msg"></div></div><div class="gmail_default gmail_msg"><font face="courier new, monospace" class="gmail_msg">But, I can generate the exe though <br class="gmail_msg">llc -filetype=obj hello.bc<br class="gmail_msg"></font></div><div class="gmail_default gmail_msg"><font face="courier new, monospace" class="gmail_msg">link hello.obj -defaultlib:libcmt</font></div><div class="gmail_default gmail_msg" style="font-family:"courier new",monospace"><br class="gmail_msg"></div><div class="gmail_default gmail_msg" style="font-family:"courier new",monospace">maybe i need a</div><div class="gmail_default gmail_msg"><div class="gmail_default gmail_msg"><font face="courier new, monospace" class="gmail_msg">D:\llvm\examples\helloworld>clang --version</font></div><div class="gmail_default gmail_msg"><font face="courier new, monospace" class="gmail_msg">clang version 5.0.0 (trunk 296084) (llvm/trunk 296083)</font></div><div class="gmail_default gmail_msg"><font face="courier new, monospace" class="gmail_msg">Target: i686-pc-windows-msvc</font></div><div class="gmail_default gmail_msg"><font face="courier new, monospace" class="gmail_msg">Thread model: posix</font></div><div class="gmail_default gmail_msg"><font face="courier new, monospace" class="gmail_msg">InstalledDir: D:\llvm\build\Debug\bin</font></div><div class="gmail_default gmail_msg"><font face="courier new, monospace" class="gmail_msg"><br class="gmail_msg"></font></div><div class="gmail_default gmail_msg"><font face="courier new, monospace" class="gmail_msg">D:\llvm\examples\helloworld>lli --version</font></div><div class="gmail_default gmail_msg"><font face="courier new, monospace" class="gmail_msg">LLVM (<a href="http://llvm.org/" class="gmail_msg" target="_blank">http://llvm.org/</a>):</font></div><div class="gmail_default gmail_msg"><font face="courier new, monospace" class="gmail_msg"> LLVM version 5.0.0svn</font></div><div class="gmail_default gmail_msg"><font face="courier new, monospace" class="gmail_msg"> DEBUG build with assertions.</font></div><div class="gmail_default gmail_msg"><font face="courier new, monospace" class="gmail_msg"> Default target: i686-pc-windows-msvc</font></div><div class="gmail_default gmail_msg"><font face="courier new, monospace" class="gmail_msg"> Host CPU: broadwell</font></div><div class="gmail_default gmail_msg"><font face="courier new, monospace" class="gmail_msg"><br class="gmail_msg"></font></div><div class="gmail_default gmail_msg"><font face="courier new, monospace" class="gmail_msg"><br class="gmail_msg"></font></div></div></div></div>
_______________________________________________<br class="gmail_msg">
LLVM Developers mailing list<br class="gmail_msg">
<a href="mailto:llvm-dev@lists.llvm.org" class="gmail_msg" target="_blank">llvm-dev@lists.llvm.org</a><br class="gmail_msg">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br class="gmail_msg">
</blockquote></div></div>