简体   繁体   English

Visual Studio 2012 - 无法打开源文件

[英]Visual Studio 2012 - cannot open source file

I have problem with visual studio. 我有视觉工作室的问题。 I added path to header files to CUDA c/C++ -> common -> Additional include directories but i got error "cannot open source file". 我添加了头文件的路径到CUDA c / C ++ - > common - >其他包含目录,但我得到错误“无法打开源文件”。 I can build program without errors but everything from this headers i have as undefinded. 我可以没有错误地构建程序,但是从这个头文件中我得到的一切都是未完成的。 :< <

If you want to build .cu files in your vs2012 project, you don't need to add additional head in your include. 如果要在vs2012项目中构建.cu文件,则无需在include中添加额外的头文件。 Instead, you can do: 相反,你可以这样做:

Right click your project -> Build Costomeizations ... -> Then check whatever cuda version installed on your computer 右键单击您的项目 - > Build Costomeizations ... - >然后检查计算机上安装的任何cuda版本

. That should add cuda headers and libs to your project. 这应该将cuda标头和库添加到您的项目中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM