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

在CLion中编译CUDA可执行文件遇报错,请求技术帮助

CUDA编译错误求助:cudafe++ died with status 0xC0000409

错误信息

[1/3] Building CUDA object CMakeFiles\test.dir\main.cu.obj
FAILED: CMakeFiles/test.dir/main.cu.obj 
C:\PROGRA~1\NVIDIA~2\CUDA\v12.5\bin\nvcc.exe -forward-unknown-to-host-compiler   -D_WINDOWS -Xcompiler=" /EHsc" -Xcompiler=" -Ob0 -Od /RTC1" -std=c++20 "--generate-code=arch=compute_52,code=[compute_52,sm_52]" -Xcompiler=-MDd -Xcompiler=-Zi -MD -MT CMakeFiles\test.dir\main.cu.obj -MF CMakeFiles\test.dir\main.cu.obj.d -x cu -rdc=true -c F:\data\code\clion\test\main.cu -o CMakeFiles\test.dir\main.cu.obj -Xcompiler=-FdCMakeFiles\test.dir\,-FS
Compilation aborted.
main.cu
nvcc error   : 'cudafe++' died with status 0xC0000409 
ninja: build stopped: subcommand failed.

源代码(main.cu)

// main.cu
#include <iostream>

int main() {
    std::cout << "Hello, world!";
}

CMakeLists.txt配置

cmake_minimum_required(VERSION 3.28)
project(test CUDA)

set(CMAKE_CUDA_STANDARD 20)

add_executable(test main.cu)

set_target_properties(test PROPERTIES
        CUDA_SEPARABLE_COMPILATION ON)

构建设置截图

构建设置截图

恳请各位提供技术帮助!


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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.06.21 16:28:17