服务器上使用nvcc编译多个cu文件,在cmake中使用nvcc编译。cu

一个关于如何在CMake项目中使用nvcc编译包含cudamemcpy的cu文件的问题。当尝试编译时遇到错误,因为-c++11标志未正确传递给nvcc。解决方案包括在CUDA_NVCC_FLAGS中添加-std=c++11或在目标级别使用cuda_add_executable。另外,如果仅使用运行时API函数,可以直接在C++文件中使用并链接到cudart库。
摘要由CSDN通过智能技术生成

I have an opencv c++ script and I need to use cudamemcpy in it. So I used cudamemcpy in my script and saved the file as a .cu I am using cmake. So I added the .cu as a cuda_executable. But when I use "sudo make" I get the following error

我有一个opencv c++脚本,我需要在其中使用cudamemcpy。因此,我在脚本中使用cudamemcpy,并将文件保存为.cu,使用cmake。因此我将.cu添加为cuda_可执行文件。但是当我使用“sudo make”时,会得到以下错误

aHR0cHM6Ly9pLnN0YWNrLmltZ3VyLmNvbS9mcjF3Zi5wbmc=

This is the makefile aHR0cHM6Ly9pLnN0YWNrLmltZ3VyLmNvbS9FY2pQVS5wbmc=

这是makefile

So in line 27 I changed c++0x to c++11 and I got the same error so I tried gnu++11 but I still have the same

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值