Build problems

Hello,

Could someone please tell me why LLVM and clang downloaded from here:

svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
svn co http://llvm.org/svn/llvm-project/cfe/trunk clang

and generated using cmake:

cmake -G “Visual Studio 15 2017” …/llvm

does not compile in Visual Studio?

I am using Batch Build in Visual Studio and I have selected only ALL_BUILD project to build as required in step 7 from here.

[

Getting Started with the LLVM System using Microsoft Visual Studio — LLVM 5 documentation

](http://llvm.org/docs/GettingStartedVS.html)

Thank you.

Last I’d heard, LLVM and clang didn’t compile with Visual Studio 2017. 2015 should work though.

It’s also helpful to include the error messages you’re getting, so that we can pinpoint any specific issues you might be running into.

Visual Studio 2017 works fine (I know because I personally made the changes to clang to get it working a few months ago :wink: Also, I use it every day.

But I don’t build from inside the IDE, only from Ninja.

But yea, seeing the error messages would help.

I am sending the errors:

Severity Code Description Project File Line Suppression State
Error LNK1104 cannot open file ‘…......\Debug\lib\clangDriver.lib’ libclang C:\build_with_clang\tools\clang\tools\libclang\LINK 1
Error LNK1104 cannot open file ‘…......\Debug\lib\clangDriver.lib’ clang-check C:\build_with_clang\tools\clang\tools\clang-check\LINK 1
Error LNK1104 cannot open file ‘…......\Debug\lib\clangDriver.lib’ arcmt-test C:\build_with_clang\tools\clang\tools\arcmt-test\LINK 1
Error LNK1104 cannot open file ‘…......\Debug\lib\libclang.lib’ c-arcmt-test C:\build_with_clang\tools\clang\tools\c-arcmt-test\LINK 1
Error LNK1104 cannot open file ‘…......\Debug\lib\libclang.lib’ c-index-test C:\build_with_clang\tools\clang\tools\c-index-test\LINK 1
Error LNK1104 cannot open file ‘…......\Debug\lib\clangCodeGen.lib’ clang-import-test C:\build_with_clang\tools\clang\tools\clang-import-test\LINK 1
Error LNK1104 cannot open file ‘…......\Debug\lib\clangDriver.lib’ diagtool C:\build_with_clang\tools\clang\tools\diagtool\LINK 1
Error C2039 ‘findByPrefix’: is not a member of ‘llvm::opt::OptTable’ clangDriver C:\llvm\tools\clang\lib\Driver\Driver.cpp 1225
Error C2672 ‘llvm::join’: no matching overloaded function found clangDriver C:\llvm\tools\clang\lib\Driver\Driver.cpp 1225
Error C2780 ‘std::string llvm::join(IteratorT,IteratorT,llvm::StringRef)’: expects 3 arguments - 2 provided clangDriver C:\llvm\tools\clang\lib\Driver\Driver.cpp 1225
Error C2039 ‘updateMax’: is not a member of ‘llvm::Statistic’ clangStaticAnalyzerFrontend C:\llvm\tools\clang\lib\StaticAnalyzer\Frontend\AnalysisConsumer.cpp 678
Error C2660 ‘llvm::getModuleSummaryIndexForFile’: function does not take 2 arguments clangCodeGen C:\llvm\tools\clang\lib\CodeGen\BackendUtil.cpp 1077
Error C2512 ‘llvm::Expected<std::unique_ptr<llvm::ModuleSummaryIndex,std::default_delete<_Ty>>>’: no appropriate default constructor available clangCodeGen C:\llvm\tools\clang\lib\CodeGen\BackendUtil.cpp 1075
Error C3861 ‘getTargetWCharSize’: identifier not found clangCodeGen C:\llvm\tools\clang\lib\CodeGen\CodeGenModule.cpp 475
Error C2039 ‘getTargetWCharSize’: is not a member of ‘llvm::TargetLibraryInfoImpl’ clangCodeGen C:\llvm\tools\clang\lib\CodeGen\CodeGenModule.cpp 478
Error C2039 ‘updateMax’: is not a member of ‘llvm::Statistic’ clangStaticAnalyzerCore C:\llvm\tools\clang\lib\StaticAnalyzer\Core\BugReporter.cpp 3451
Error C2039 ‘updateMax’: is not a member of ‘llvm::Statistic’ clangStaticAnalyzerCore C:\llvm\tools\clang\lib\StaticAnalyzer\Core\BugReporter.cpp 3456

Error LNK1104 cannot open file ‘…......\Debug\lib\clangCodeGen.lib’ clang C:\build_with_clang\tools\clang\tools\driver\LINK 1

Visual Studio 2017 works fine (I know because I personally made the changes to clang to get it working a few months ago :wink: Also, I use it every day.

But I don’t build from inside the IDE, only from Ninja.

But yea, seeing the error messages would help.