[llvm-dev] lli can't find vsprintf

don hinton via llvm-dev llvm-dev at lists.llvm.org
Sat Feb 25 09:30:09 PST 2017


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.

hth...
Don

On Fri, Feb 24, 2017 at 9:02 PM jmiguel hernandez via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> Hi
> 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.
>
> clang -c hello.c -emit-llvm -o hello.bc
> lli hello.bc
> D:\llvm\examples\helloworld>lli hello.bc
> LLVM ERROR: Program used external function '___stdio_common_vsprintf'
> which could not be resolved!
>
> But, I can generate the exe though
> llc -filetype=obj hello.bc
> link hello.obj -defaultlib:libcmt
>
> maybe i need a
> D:\llvm\examples\helloworld>clang --version
> clang version 5.0.0 (trunk 296084) (llvm/trunk 296083)
> Target: i686-pc-windows-msvc
> Thread model: posix
> InstalledDir: D:\llvm\build\Debug\bin
>
> D:\llvm\examples\helloworld>lli --version
> LLVM (http://llvm.org/):
>   LLVM version 5.0.0svn
>   DEBUG build with assertions.
>   Default target: i686-pc-windows-msvc
>   Host CPU: broadwell
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170225/a1328197/attachment.html>


More information about the llvm-dev mailing list