英文:
visual studio error: glm can't open glm\detail\glm.cpp
问题
我学习OpenGL并跟随这个代码:https://github.com/JoeyDeVries/LearnOpenGL
第一章可以运行,但在引入glm后,我发现了一个错误:无法打开源代码:"glm\detail\glm.cpp":找不到文件或目录。
我的代码是:
#include <glad/glad.h>
#include <GLFW/glfw3.h>
#define STB_IMAGE_IMPLEMENTATION
#include <stb_image.h>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <shader.h>
#include <iostream>
我已经将我的 "include" 文件夹包含在解决方案资源管理器中,也在属性 - 附加包含目录中输入了我的包含目录路径。
当我按住 "Ctrl" 键并将鼠标悬停在 "#include <glm/glm.hpp>" 上时,它会变蓝,并单击会跳转到glm代码。这可能表明我已经成功地包含了glm,但是可能出现了某些错误?
英文:
I learn opengl and follow the code in https://github.com/JoeyDeVries/LearnOpenGL
First chapter can run, but after introduce glm, I found an error: can' t open source code: "glm\detail\glm.cpp": No such file or directory.
My code is:
#include <glad/glad.h>
#include <GLFW/glfw3.h>
#define STB_IMAGE_IMPLEMENTATION
#include <stb_image.h>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <shader.h>
#include <iostream>
I have included my "include" folder in solution resource manager, and I also entered my include directory path into properity - additional include directory.
When I hold "Ctrl" key and hover my mouse on "#include <glm/glm.hpp>", it turns blue and clicking can result in jumping into glm code. So it may shows that I have include glm successfully but somewhere wrong?
答案1
得分: 0
我在Visual Studio可能犯了一个错误,我发现解决方案资源管理器中包含了两个glm.cpp,只有当我切换到解决方案视图并拖动窗口句柄以查看glm.cpp的情况时,我才发现了这个错误。
这两个glm.cpp有不同的相对路径,看起来很奇怪。
其中一个glm.cpp被双击后出现错误,所以我将其从解决方案中排除,然后就没有错误了。
总之,这只是关于Visual Studio解决方案管理的一个微小错误,与OpenGL无关。
英文:
I may be make a mistake in Visual Studio, I found two glm.cpp are included in solution resource manager, only when I switch to Solution view and drag the windows handle to see the situation of glm.cpp, then I found this mistake.
The two glm.cpp have different relative path, looks weird.
One of these two glm.cpp is double clicked and then give error, so I exclude it from solution, then no error.
All in all, it is a trival mistake about Visual Studio Solution management but no opengl.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论