Skip to content

Windows11 build llama.cpp CMakeFiles error #99

@ali-88123

Description

@ali-88123

When i use Visual Stidio2019,CLang 17.0.6,it meets:

-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.22631.
CMake Error at CMakeLists.txt:2 (project):
  Failed to run MSBuild command:

    D:/VC2019/MSBuild/Current/Bin/MSBuild.exe

  to get the value of VCTargetsPath:

    用于 .NET Framework 的 Microsoft (R) 生成引擎版本 16.11.6+a918ceb31
    版权所有(C) Microsoft Corporation。保留所有权利。
    
    生成启动时间为 2025/9/22 14:55:24。
    节点 1 上的项目“D:\repo\T-MAC\3rdparty\llama.cpp\build\CMakeFiles\4.1.1\VCTargetsPath.vcxproj”(默认目标)。
    D:\VC2019\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(439,5): error MSB8020: 无法找到 ClangCL 的生成工具(平台工具集 =“ClangCL”)。若要使用 ClangCL 生成工具进行生成,请安装 ClangCL 生成工具。或者,可以升级到当前 Visual Studio 工具,方式是通过选择“项目”菜单或右键单击该解决方案,然后选择“重定解决方案目标”。 [D:\repo\T-MAC\3rdparty\llama.cpp\build\CMakeFiles\4.1.1\VCTargetsPath.vcxproj]
    已完成生成项目“D:\repo\T-MAC\3rdparty\llama.cpp\build\CMakeFiles\4.1.1\VCTargetsPath.vcxproj”(默认目标)的操作 - 失败。
    
    生成失败。
    
    “D:\repo\T-MAC\3rdparty\llama.cpp\build\CMakeFiles\4.1.1\VCTargetsPath.vcxproj”(默认目标) (1) ->
    (PrepareForBuild 目标) -> 
      D:\VC2019\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(439,5): error MSB8020: 无法找到 ClangCL 的生成工具(平台工具集 =“ClangCL”)。若要使用 ClangCL 生成工具进行生成,请安装 ClangCL 生成工具。或者,可以升级到当前 Visual Studio 工具,方式是通过选择“项目”菜单或右键单击该解决方案,然后选择“重定解决方案目标”。 [D:\repo\T-MAC\3rdparty\llama.cpp\build\CMakeFiles\4.1.1\VCTargetsPath.vcxproj]
    
        0 个警告
        1 个错误
    
    已用时间 00:00:00.56
    

  Exit code: 1



-- Configuring incomplete, errors occurred!

How can i solve it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions