MacOSX 上的 OpenGL 头文件在哪里? [英] Where are the OpenGL header files located on MacOSX?
本文介绍了MacOSX 上的 OpenGL 头文件在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在/usr/include 中,
In /usr/include ,
我尝试搜索 GL gl 和 OpenGL ......但找不到它.
I tried grepping for GL gl and OpenGL .. .but can't find it.
这些头文件在哪里?
推荐答案
它们位于/System/Library/Frameworks/OpenGL.framework/Headers.要包含它们,只需使用:
They are located at /System/Library/Frameworks/OpenGL.framework/Headers. To include them, just use:
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#include <OpenGL/glext.h>
#include <GLUT/glut.h>
等等.确保链接到适当的框架,例如)
etc. Make sure to link against the appropriate frameworks, eg)
cc <your_file.c> -framework GLUT -framework OpenGL
用于 OpenGL 和 GLUT
for OpenGL and GLUT
这篇关于MacOSX 上的 OpenGL 头文件在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文