【问题标题】:Is it possible to integrate nvcc with gcc/g++ in windows?是否可以在 Windows 中将 nvcc 与 gcc/g++ 集成?
【发布时间】:2021-10-13 23:52:40
【问题描述】:

我想知道是否可以在基于 Windows 的 CUDA 中使用 gcc/g++ 作为 c/c++ 编译器?此外,如何将 fortran 与 nvcc 一起编译? 我正在运行 CUDA 10.2 和 mingw gcc 8.1.0。

【问题讨论】:

  • 不,这是不可能的。 Windows 上的 CUDA 工具包仅适用于 Visual Studio
  • 谢谢。我会试试 MSVC。

标签: gcc cuda mingw-w64 nvcc


【解决方案1】:

不,这是不可能的。唯一的supported host compiler for use with CUDA on windows 是 cl.exe,Visual Studio C++ 附带的编译器。

如果您在 Windows 上使用 WSL2 环境,那么您 can usegcc/g++ 和 CUDA 在类似 linux 的环境中。

【讨论】:

  • 知道了。所以我将停止在这个话题上的斗争。与 cl 一起前进。谢谢
猜你喜欢
  • 2021-10-27
  • 1970-01-01
  • 2011-11-25
  • 2015-10-23
  • 2015-11-22
  • 2023-03-12
  • 2013-04-07
  • 2011-06-14
  • 2015-09-28
相关资源
最近更新 更多