basically I am following the tutorial here after hours of search I released that I can install freeglut, glew and glfw3 using brew. and then by adding /usr/local/Cellar
to the end of /etc/paths
and using the command line like below: g++ -framework OpenGL foo.c -lGLEW -lglfw3 lGLUT
or g++ -framework OpenGL -framework GLUT foo.c -lGLEW -lglfw3
I can get the code compiled. however when I run the compiled program it stopes with a stake overflow error Segmentation fault: 11
you may see the complete error report in the attachment.
well I figiured part of the problem out apparantly by using
right before
the problems gets solved. I learned it from here.
however I have another error when runing:
don't know how to solve it!
You are not using freeglut. You are using Apple's implementation of GLUT. Also none of your problems have anything to do with either.
@John, thanks for your reply, yes I had already gueesed that. so would you be so kind to help me find the right command to compile my code? it must be something like this:
Last edit: Foad S. Farimani 2016-11-03
it seems that I'm not the only one who doesn't know how to use freeglut instead of main mac glut. you may see here and here they have all got it wrong apparantly!