简体   繁体   English

Visual Studio 无法打开源文件<vulkan.h>

[英]Visual studio cannot open source file <vulkan.h>

I've looked it up and the internet says to simply add the directory.我查了一下,互联网上说只需添加目录。 But I have already done that (I believe).但我已经做到了(我相信)。

This is the folder: it is C:\\VulkanSDK\\1.1.126.0\\Include\\vulkan (maybe i'm wrong?)这是文件夹:它是 C:\\VulkanSDK\\1.1.126.0\\Include\\vulkan(也许我错了?)

this is the place where I included the folder:这是我包含文件夹的地方:

This is the line of code: #include the error says "cannot open source file"vulkan.h"这是代码行:#include 错误提示“无法打开源文件”vulkan.h”

I have also tried including just the "Include" folder and then typing in code "include" but that dint work either.我也试过只包含“Include”文件夹,然后输入代码“include”,但那也不行。

Thank you for helping me.感谢你们对我的帮助。

First off, you want include path to be C:\\VulkanSDK\\1.1.126.0\\Include directory, not C:\\VulkanSDK\\1.1.126.0\\Include\\vulkan directory.首先,您希望包含路径为C:\\VulkanSDK\\1.1.126.0\\Include目录,而不是C:\\VulkanSDK\\1.1.126.0\\Include\\vulkan目录。 The correct include declaration is:正确的包含声明是:

#include <vulkan/vulkan.h>

Second, I would suggest adding the include to the Additional Include Directories , as seen here:其次,我建议将 include 添加到Additional Include Directories ,如下所示:

在此处输入图片说明

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

相关问题 无法在Visual Studio中打开源文件“ SDKDDKVer.h” - Cannot open source file “SDKDDKVer.h” in Visual Studio Visual Studio 2017 无法打开源文件<windows.h> - Visual Studio 2017 Cannot open source file <windows.h> 无法在visual studio 2015中打开源文件 - Cannot open source file in visual studio 2015 Visual Studio 2012 - 无法打开源文件 - Visual Studio 2012 - cannot open source file 错误:无法打开源文件#include <libcec/cec.h> 在Visual Studio 2012中 - Error: cannot open source file #include<libcec/cec.h> in visual studio 2012 无法在Windows桌面的Microsoft Visual Studio Express 2013中打开源文件GL / glut.h - cannot open source file GL/glut.h in Microsoft Visual Studio Express 2013 for windows desktop 无法在 visual studio 2022 上打开源文件 - Cannot open source file on visual studio 2022 使用平台工具集v100的Visual Studio 2012。 无法打开源文件“ atlbase.h” - Visual Studio 2012 using platform toolset v100. Cannot open source file “atlbase.h” “新”安装的 Visual Studio 在“无法打开源文件“errno.h”类型的空白程序上返回 408 错误 - "newly" installed visual studio returns 408 errors on blank program of type 'cannot open source file "errno.h" ' 无法在Visual Studio 2010中打开包含文件&#39;stdlib.h&#39; - Cannot open include file 'stdlib.h' in Visual Studio 2010
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM