版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/YangZuo_Chester/article/details/83186258
gcc -framework OpenGL -framework GLUT yourcode.cpp
To make a GLUT application on the command line,
make sure you’ve run xcode-setup --install
when linking your code, use the following linker options:
-framework OpenGL -framework GLUT