<div dir="ltr">AFAICT, the linker is complaining that it cannot find CoTaskMemFree. Did you try adding Ole32.lib (<a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms680722(v=vs.85).aspx">https://msdn.microsoft.com/en-us/library/windows/desktop/ms680722(v=vs.85).aspx</a>) to the list of libraries the linker looks at?<div><br></div><div>Regards</div><div>Senthil</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Nov 14, 2015 at 9:57 AM, justin chase via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello all!<div><br></div><div>Please forgive me if this is the wrong mailing list for my question.</div><div><br></div><div>First off, I am on Windows and using git bash for everything:</div><div><br><div>$ uname</div><div>MINGW32_NT-6.2</div><div><br></div><div>I am attempting to essentially do the kalidescope example. I have copied the code verbatim from the full code listing and am running the following command:</div><div><br></div><div>$ clang-cl toy.cpp deps/llvm/build/Debug/lib/*.lib //MDd -o toy.exe -I deps/llvm/include</div><div><br></div><div>Which results in this error:</div><div><br></div><div>LLVMSupport.lib(Path.obj) : error LNK2019: unresolved external symbol __imp_CoTaskMemFree referenced in function "bool __cdecl</div><div>llvm::sys::path::getKnownFolderPath(struct _GUID,class llvm::SmallVectorImpl<char> &)" (?getKnownFolderPath@path@sys@llvm@@YA_N</div><div>U_GUID@@AEAV?$SmallVectorImpl@D@3@@Z)</div><div>toy.exe : fatal error LNK1120: 1 unresolved externals</div><div><br></div><div>I've tried simplifying things but no matter what I do that is the error I get. So I'm assuming I'm not building llvm correctly. Here is essentially what I'm doing:</div><div><br>$ cd deps</div><div>$ git clone <a href="http://llvm.org/git/llvm.git" target="_blank">http://llvm.org/git/llvm.git</a><br>$ mkdir llvm/build && cd llvm/build<br>$ cmake .. -G "Visual Studio 2012 Win64"<br>$ cmake --build .<br><br>That builds for quite a while but eventually appears to succeed without any errors. I had to manually copy a few files that were transformed but not copied to where there were expected to be but after figuring that my code appears to compile except for the missing getKnowFolderPath function.</div><div><br></div><div>What's really strange is that I see that function in the code, Path.inc. I can't seem to figure out why this function would be unresolvable. </div><div><br></div><div>Can anyone here help me figure out what I'm doing wrong? I'm assuming there is some define or other flag that I need to specify to get linking correctly.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div><br></div>-- <br><div><div dir="ltr"><div><a href="http://justinmchase.com" target="_blank">http://justinmchase.com</a></div></div></div>
</font></span></div></div>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div>