[cfe-dev] Clang linking errors (visual studio 2013)

Yaron Keren yaron.keren at gmail.com
Sun Jun 8 05:14:58 PDT 2014


Hi,

The problem is not likely to be from the sources but rather the VS build
system. 99%+ of the time it works well and but rarely I had to delete the
msvc folder and re-create the project files using CMake to fix issues like
the one you're having.

Yaron



2014-06-08 15:01 GMT+03:00 Kim <soldoutseashell at gmail.com>:

> I've been using the clang libraries integrated into my program for several
> months without any problems but today when I updated clang/llvm to latest
> revision and tried to rebuild my project I got these linker errors:
>
> 1>clangCodeGen.lib(CodeGenModule.obj) : error LNK2019: unresolved
> external symbol "public: static class llvm::error_code __cdecl
> llvm::IndexedInstrProfReader::create(class std::basic_string<char,struct
> std::char_traits<char>,class std::allocator<char> >,class
> std::unique_ptr<class llvm::IndexedInstrProfReader,struct
> std::default_delete<class llvm::IndexedInstrProfReader> > &)" (?create@
> IndexedInstrProfReader at llvm@@SA?AVerror_code at 2@V?$basic_string at DU
> ?$char_traits at D@std@@V?$allocator at D@2@@std@@AAV?$unique_ptr@
> VIndexedInstrProfReader at llvm@@U?$default_delete@
> VIndexedInstrProfReader at llvm@@@std@@@5@@Z) referenced in function
> "public: __thiscall clang::CodeGen::CodeGenModule::CodeGenModule(class
> clang::ASTContext &,class clang::CodeGenOptions const &,class llvm::Module
> &,class llvm::DataLayout const &,class clang::DiagnosticsEngine &)"
> (??0CodeGenModule at CodeGen@clang@@QAE at AAVASTContext@2 at ABVCodeGenOptions@2
> @AAVModule at llvm@@ABVDataLayout at 6@AAVDiagnosticsEngine at 2@@Z)
>
> 1>clangCodeGen.lib(CodeGenPGO.obj) : error LNK2019: unresolved external
> symbol "public: class llvm::error_code __thiscall
> llvm::IndexedInstrProfReader::getFunctionCounts(class
> llvm::StringRef,unsigned __int64 &,class std::vector<unsigned __int64,class
> std::allocator<unsigned __int64> > &)" (?getFunctionCounts@
> IndexedInstrProfReader at llvm@@QAE?AVerror_code at 2@VStringRef at 2@AA_KAAV
> ?$vector at _KV?$allocator at _K@std@@@std@@@Z) referenced in function
> "private: void __thiscall clang::CodeGen::CodeGenPGO::loadRegionCounts(class
> llvm::IndexedInstrProfReader *)" (?loadRegionCounts at CodeGenPGO@
> CodeGen at clang@@AAEXPAVIndexedInstrProfReader at llvm@@@Z)
>
> I've deleted my clang and llvm source folders, performed a fresh checkout
> of both and completely rebuilt everything but I still get these errors.
>
> Anyone know what the problem could be?
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140608/1045e1c6/attachment.html>


More information about the cfe-dev mailing list