You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

安装Bellhopcxx时遇CMake项目无Debug|x64组合错误求助

解决Bellhopcxx(bellhopcuda)Windows构建错误:Debug|x64配置缺失

我要安装水下声学工具箱Bellhopcxx(对应仓库为bellhopcuda),已执行以下安装步骤:

Microsoft Windows [Version 10.0.26100.8390]
(c) Microsoft Corporation. All rights reserved.

C:\Users\s1447548>git clone https://github.com/A-New-BellHope/bellhopcuda.git
Cloning into 'bellhopcuda'...
remote: Enumerating objects: 4650, done.
remote: Counting objects: 100% (423/423), done.
remote: Compressing objects: 100% (231/231), done.
remote: Total 4650 (delta 245), reused 252 (delta 186), pack-reused 4227 (from 2)
Receiving objects: 100% (4650/4650), 10.45 MiB | 7.85 MiB/s, done.
Resolving deltas: 100% (3555/3555), done.

C:\Users\s1447548>cd bellhopcuda/

C:\Users\s1447548\bellhopcuda>git submodule update --init --recursive
Submodule 'glm' (https://github.com/g-truc/glm) registered for path 'glm'
Cloning into 'C:/Users/s1447548/bellhopcuda/glm'...
Submodule path 'glm': checked out '6ad79aae3eb5bf809c30bf1168171e9e55857e45'

C:\Users\s1447548\bellhopcuda>mkdir build

C:\Users\s1447548\bellhopcuda>cd build/

C:\Users\s1447548\bellhopcuda\build>cmake ..
-- Building for: Visual Studio 18 2026
CMake Warning at config/CMakeLists.txt:21 (message):
  clang-format pre-commit hook not found, installing

-- The CXX compiler identification is MSVC 19.51.36244.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/18/Community/VC/Tools/MSVC/14.51.36231/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Not GCC or clang, assuming Windows format compile flags
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
-- Found Threads: TRUE
-- The CUDA compiler identification is NVIDIA 13.3.33 with host compiler MSVC 19.51.36244.0
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Check for working CUDA compiler: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v13.3/bin/nvcc.exe - skipped
-- Detecting CUDA compile features
-- Detecting CUDA compile features - done
-- Not GCC or clang, assuming Windows format compile flags
-- CUDA extra flags: -Xcudafe --diag_warning=local_variable_hidden -Xcudafe --diag_warning=decl_hides_catch_parameter -Xcudafe --diag_warning=decl_hides_function_parameter -Xcudafe --diag_warning=decl_hides_template_parameter -Xcudafe --diag_warning=for_init_hides_declaration -Xcudafe --diag_warning=declaration_hides_for_init -Xcudafe --diag_suppress=esa_on_defaulted_function_ignored -ftz=true --expt-relaxed-constexpr
-- Full CUDA flags:   -Xcompiler=/W4 -Xcompiler=/wd4244 -Xcudafe --diag_warning=local_variable_hidden -Xcudafe --diag_warning=decl_hides_catch_parameter -Xcudafe --diag_warning=decl_hides_function_parameter -Xcudafe --diag_warning=decl_hides_template_parameter -Xcudafe --diag_warning=for_init_hides_declaration -Xcudafe --diag_warning=declaration_hides_for_init -Xcudafe --diag_suppress=esa_on_defaulted_function_ignored -ftz=true --expt-relaxed-constexpr
-- Not GCC or clang, assuming Windows format compile flags
-- Configuring done (8.2s)
-- Generating done (0.3s)
-- Build files have been written to: C:/Users/s1447548/bellhopcuda/build

但执行最后一步构建命令时出现错误:

C:\Users\s1447548\bellhopcuda\build>cmake --build .
MSBuild version 18.6.3+84d3e95b4 for .NET Framework

C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Microsoft\VC\v180\Microsoft.CppBuild.targets(468,5): error MSB8013: This project doesn't contain the Configuration and Platform combination of Debug|x64. [C:\Users\s1447548\bellhopcuda\build\ZERO_CHECK.vcxproj]

我已安装Visual Studio Code,推测是CMake配置存在遗漏,以下是解决方法:

解决方法

方法1:构建时指定配置和平台

执行构建命令时明确指定目标配置(Release/Debug)和平台,命令如下:

cmake --build . --config Release --platform x64

如果项目默认只提供Release配置,也可以简化为:

cmake --build . --config Release

方法2:重新生成CMake构建文件并指定平台

先清理现有build目录,重新运行CMake时明确指定生成x64平台的项目:

cd ..
rmdir /s /q build
mkdir build
cd build
cmake .. -G "Visual Studio 18 2026" -A x64

之后再执行构建命令:

cmake --build . --config Release

方法3:通过Visual Studio构建

打开build目录下的解决方案文件(如bellhopcuda.sln),在Visual Studio中选择x64平台和对应的配置(Release/Debug),点击顶部菜单栏的「生成」按钮完成构建。

内容的提问来源于stack exchange,提问作者user21764386

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.10 15:03:10