# include <GL/glew.h>
# include <GLFW/glfw3.h>
我对代码中的导入没有问题,但在添加
glViewport(0, 0, bufferWidth, bufferHeight);
我的m1 mac开始出现问题。
Undefined symbols for architecture arm64:
"_glClear", referenced from:
_main in main.o
"_glClearColor", referenced from:
_main in main.o
"_glViewport", referenced from:
_main in main.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
有什么问题吗?
1条答案
按热度按时间0sgqnhkj1#
问候!问题可能是您如何设置glew,并确保您使用的是GLFW的相同位版本(如果您使用GLFW 32位,请确保也使用glew 32位)