c++ - Microsoft Visual Studio 具有来自以前但不是当前设置的编译错误
问题描述
我正在尝试使用ImGui
但是我得到这些错误编译一个项目:
Severity Code Description Project File Line Suppression State
Error C1083 Cannot open source file: 'src\vendor\imgui\imgui_widgets.cpp': No such file or directory SDL2_IMGUI_TEST D:\Not_Streaming\Commonly_Used\Programming\C++\Projects\SDL2_IMGUI_TEST\SDL2_IMGUI_TEST\c1xx 1
Error C1083 Cannot open source file: 'src\vendor\imgui\imgui.cpp': No such file or directory SDL2_IMGUI_TEST D:\Not_Streaming\Commonly_Used\Programming\C++\Projects\SDL2_IMGUI_TEST\SDL2_IMGUI_TEST\c1xx 1
Error C1083 Cannot open source file: 'src\vendor\imgui\imgui_demo.cpp': No such file or directory SDL2_IMGUI_TEST D:\Not_Streaming\Commonly_Used\Programming\C++\Projects\SDL2_IMGUI_TEST\SDL2_IMGUI_TEST\c1xx 1
Error C1083 Cannot open source file: 'src\vendor\imgui\imgui_draw.cpp': No such file or directory SDL2_IMGUI_TEST D:\Not_Streaming\Commonly_Used\Programming\C++\Projects\SDL2_IMGUI_TEST\SDL2_IMGUI_TEST\c1xx 1
Error C1083 Cannot open source file: 'src\vendor\imgui\imgui_impl_opengl3.cpp': No such file or directory SDL2_IMGUI_TEST D:\Not_Streaming\Commonly_Used\Programming\C++\Projects\SDL2_IMGUI_TEST\SDL2_IMGUI_TEST\c1xx 1
Error C1083 Cannot open source file: 'src\vendor\imgui\imgui_impl_sdl.cpp': No such file or directory SDL2_IMGUI_TEST D:\Not_Streaming\Commonly_Used\Programming\C++\Projects\SDL2_IMGUI_TEST\SDL2_IMGUI_TEST\c1xx 1
Error C1083 Cannot open source file: 'src\vendor\imgui\imgui_stdlib.cpp': No such file or directory SDL2_IMGUI_TEST D:\Not_Streaming\Commonly_Used\Programming\C++\Projects\SDL2_IMGUI_TEST\SDL2_IMGUI_TEST\c1xx 1
Error C1083 Cannot open source file: 'src\vendor\imgui\imgui_tables.cpp': No such file or directory SDL2_IMGUI_TEST D:\Not_Streaming\Commonly_Used\Programming\C++\Projects\SDL2_IMGUI_TEST\SDL2_IMGUI_TEST\c1xx 1
这真的很奇怪,因为文件曾经位于名为的文件夹src\vendor
中,但现在位于另一个名为Dependencies\imgui
. 为什么它甚至提到一个名为 vendor 的文件夹对我来说没有意义?这是我的搜索目录#include
$(SolutionDir)Dependencies\imgui
$(SolutionDir)Dependencies\GLEW\include
$(SolutionDir)Dependencies\SDL2\include
GLEW 有一个预处理器,但没有 IMGUI,有 GLEW 和 SDL2 的链接器设置,但没有 IMGUI。这些是编译错误。可能是什么问题呢?
解决方案
推荐阅读
- amazon-web-services - EC2 安全组入站规则未按预期工作
- elasticsearch - 如何更改 Elasticsearch 网络主机
- jquery - Jquery如果勾选了复选框然后隐藏父li
- javascript - jQuery表单提交方法不起作用
- sql - 为什么触发器 SET 仅适用于减法运算,而不适用于求和?
- youtube-data-api - Youtube 数据 API v3 nextPageToken 不工作
- php - 将数组中的每个值除以下一个值以返回一个数字
- node.js - Node SASS 的 React JS Webpack 失败
- javascript - javascript中未定义的输入字段值
- fabricjs - Fabric.js insertAt 未按预期工作