简体   繁体   English

Visual Studio 试图打开不再在项目中的源文件(致命错误 C1083)

[英]Visual Studio trying to open source file that is no longer in project (fatal error C1083)

The problem is quite simple, really.问题很简单,真的。 I had imgui included in my project and I'm no longer using it.我的项目中包含了 imgui,我不再使用它。 However, VS still tries to open them every time I try to compile.但是,每次我尝试编译时,VS 仍然会尝试打开它们。

I removed all includes and deleted the files from my project completely.我删除了所有包含并从我的项目中完全删除了文件。 There is no mention of it anywhere.任何地方都没有提到它。 I don't have it included as an external library either (it's header-only).我也没有将它作为外部库包含(它只是标题)。 I've ran out of ideas.我已经没有想法了。

Error log:错误日志:

1>imgui.cpp
1>c1xx : fatal error C1083: Cannot open source file: 'Source\imgui\imgui.cpp': No such file or directory
1>imgui_draw.cpp
1>c1xx : fatal error C1083: Cannot open source file: 'Source\imgui\imgui_draw.cpp': No such file or directory
1>imgui_impl_glfw.cpp
1>c1xx : fatal error C1083: Cannot open source file: 'Source\imgui\imgui_impl_glfw.cpp': No such file or directory
1>imgui_impl_opengl3.cpp
1>c1xx : fatal error C1083: Cannot open source file: 'Source\imgui\imgui_impl_opengl3.cpp': No such file or directory
1>imgui_impl_win32.cpp
1>c1xx : fatal error C1083: Cannot open source file: 'Source\imgui\imgui_impl_win32.cpp': No such file or directory
1>imgui_widgets.cpp
1>c1xx : fatal error C1083: Cannot open source file: 'Source\imgui\imgui_widgets.cpp': No such file or directory

Is there any way to solve this?有没有办法解决这个问题?

Figured it out.弄清楚了。 Turns out trying to add imgui as an additional library in an attempt to workaround another problem leaves VS thinking it exists on your source even after removing everything.事实证明,试图将 imgui 添加为附加库以解决另一个问题,即使在删除所有内容后,VS 也会认为它存在于您的源代码中。 Experimenting sometimes creates unexpected problems.尝试有时会产生意想不到的问题。

Had the same problem following Cherno's tutorial when I downloaded the wrong version of imgui.当我下载错误版本的 imgui 时,在 Cherno 的教程之后遇到了同样的问题。 Already having included files into the build but then deleting from file explorer caused my error.已经将文件包含在构建中,但随后从文件资源管理器中删除导致了我的错误。 I just made phony empty files of the same name in a different folder and then just transferred them into the imgui folder to trick VS, then rebuilt.我只是在另一个文件夹中制作了同名的假空文件,然后将它们转移到 imgui 文件夹中以欺骗 VS,然后重新构建。 Worked fine afterwards.之后工作正常。

暂无
暂无

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

相关问题 如何使用Visual Studio解决“严重错误C1083:无法打开包含文件” - How to fix “fatal error C1083: Cannot open include file” using Visual Studio Visual Studio 2013:致命错误C1083:无法打开包含文件:'winsock2.h':没有此类文件或目录 - Visual Studio 2013: fatal error C1083: Cannot open include file: 'winsock2.h': No such file or directory Microsoft Visual Studio Community 2019:致命错误 C1083:无法打开包含文件:'corecrt.h':没有这样的文件或目录 - Microsoft Visual Studio Community 2019: fatal error C1083: Cannot open include file: 'corecrt.h': No such file or directory 无法在Visual Studio和vcpkg中构建cmake项目(严重错误C1083) - Cannot build a cmake project in Visual Studio and vcpkg (fatal error C1083) "c1xx : 致命错误 C1083: 无法打开源文件 - 带有一些中文或爪哇语" - c1xx : fatal error C1083: Cannot open source file - with some Chinese or Javanese 为什么出现致命错误C1083:无法打开源文件(vc ++) - Why fatal error C1083: Cannot open source file (vc++) SWIG致命错误C1083:无法打开包含文件 - SWIG Fatal error C1083: Cannot open include file QtCreator中的“致命错误C1083:无法打开包含文件” - “Fatal Error C1083: Cannot open include file” in QtCreator “致命错误 C1083:无法打开包含文件”但我已将目录添加到项目 - “Fatal error C1083: Cannot open include file” but I have added directory to project 遇到“'cl.exe' 无法识别”和“c1xx:致命错误 C1083:无法打开源文件:没有这样的文件或目录”错误 - Ran into a “'cl.exe' is not recognized” and “c1xx: fatal error C1083: Cannot open source file: No such file or directory” error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM