I'm slowly working my way through this book Introduction to OpenGL (perhaps too slowly... I think my understanding of C / Objective-C / Objective-C 2.0 / Cocoa / Cocoa Touch are all slipping away as I read this... hopefully looking over my previous projects will bring back the memories of how it all works...) and I noticed that one of the examples in it has:
I changed it to:
I ran it and it works fine... but it made me wonder about stdlib.h. Is it already included in cocoa.h? Or is it just that the example in the book didn't need stdlib.h to work properly and that in the future I may need to include it? (Where would I find the framework that includes it anyways?)
Code:
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glut.h>
#include <stdlib.h>
I changed it to:
Code:
#import <Cocoa/Cocoa.h>
#import <OpenGL/gl.h>
#import <OpenGL/glu.h>
#import <GLUT/glut.h>
I ran it and it works fine... but it made me wonder about stdlib.h. Is it already included in cocoa.h? Or is it just that the example in the book didn't need stdlib.h to work properly and that in the future I may need to include it? (Where would I find the framework that includes it anyways?)