Errors compiling with latest opengl sdk

I downloaded the latest opengl 1.2 sdk and i’m having problems compiling using GLUT. I read the glut 3.7 readme and i still don’t know whats going on.

I wrote a simple glut program to make it easy to see what i mean, plus i’ll post my errors. I’m using codewarrior 5.1

#include <stdlib.h>
#include <GL/glut.h>

void display(void)
glColor3f(1.0, 1.0, 0.5);
glVertex2f(0.0, 0.0);
glVertex2f(1.0, 2.0);
glVertex2f(2.0, 0.0);


void init(void)
glClearColor(0.0, 0.0, 0.0, 0.0);
glOrtho(0.0, 1.0, 0.0, 1.0, -1.0, 1.0);

int main(int argc, char** argv)
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
glutInitWindowPosition(100, 100);
glutInitWindowSize(400, 400);
return 0;

these are the errors i’m getting…
Error : declaration syntax error
GL/glut.h line 435 //extern int APIENTRY glutCreatePlainWindow(const char *title);

Error : declaration syntax error
GL/glut.h line 484 //extern void APIENTRY glutAttachMenuName(int button, char *menu_name);

i’m not sure why i’m getting these errors.
I even commented those lines out in the GL/glut.h file. Then i get a whole list of errors where glut functions are not defined.

One more thing, anyone know where to get the tk.h file? I seemed to have lost it and i can’t remember where to download it.


Do you want to send me the codewarrior project

Do you want to send me the codewarrior project

Hey Gavin, thanks for the help, but i figured(with some help from out the problem.

Cheers and take care.

glad you fixed in 9600man - I saw your post at xlr8yourmac but have been awol (read ill)