如何继续使用macOS Catalina 10.15.4在OpenGL上工作? [英] How can I continue working on OpenGL with macOS Catalina 10.15.4?
本文介绍了如何继续使用macOS Catalina 10.15.4在OpenGL上工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图在macOS Catalina 10.15.4上使用OpenGL,但是出现错误;
I am trying to work with OpenGL on macOS Catalina 10.15.4 but there is a error;
GL/glew.h
GL/freeglut.h
GL/glew.h
GL/freeglut.h
找不到文件!
我的代码
// main.cpp
#include"GL/glew.h" // error; 'GL/glew.h' file not found
#include"GL/freeglut.h" // error; 'GL/freeglut.h' file not found
#include<iostream>
#define GLEW_STATIC
void display(void) { }
int main(int argc, char *argv[]) {
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGBA);
glutInitWindowPosition(500, 200);
glutInitWindowSize(500, 350);
glutCreateWindow("OpenGL Merhaba Dunya");
glutDisplayFunc(display);
glutMainLoop();
}
框架和Xcode上的库"标签;
frameworks & libraries tab on Xcode;
Xcode上的构建阶段"标签;
Build phases tab on Xcode;
标题搜索路径;
我的朋友在Mac上的版本较低,他可以对其进行处理.但是我的Mac是最新的,但是我不能工作?
My friend has a lower version on his Mac and he can work on it. But my Mac up to date but I can't work?
我正在使用OpenGL(c ++)
I am working with OpenGL (c++)
推荐答案
我更改了路径;
<代码>/usr/locale/include
至;
<代码>/usr/local/include
感谢 @Botje
这篇关于如何继续使用macOS Catalina 10.15.4在OpenGL上工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文