[llvm-dev] (no subject)

justin chase via llvm-dev llvm-dev at lists.llvm.org
Fri Nov 13 20:27:12 PST 2015


Hello all!

Please forgive me if this is the wrong mailing list for my question.

First off, I am on Windows and using git bash for everything:

$ uname
MINGW32_NT-6.2

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:

$ clang-cl toy.cpp deps/llvm/build/Debug/lib/*.lib //MDd -o toy.exe -I
deps/llvm/include

Which results in this error:

LLVMSupport.lib(Path.obj) : error LNK2019: unresolved external symbol
__imp_CoTaskMemFree referenced in function "bool __cdecl
llvm::sys::path::getKnownFolderPath(struct _GUID,class
llvm::SmallVectorImpl<char> &)" (?getKnownFolderPath at path@sys at llvm@@YA_N
U_GUID@@AEAV?$SmallVectorImpl at D@3@@Z)
toy.exe : fatal error LNK1120: 1 unresolved externals

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:

$ cd deps
$ git clone http://llvm.org/git/llvm.git
$ mkdir llvm/build && cd llvm/build
$ cmake .. -G "Visual Studio 2012 Win64"
$ cmake --build .

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.

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.

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.


-- 
http://justinmchase.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151113/fedeca42/attachment.html>


More information about the llvm-dev mailing list