Help with <GL/glut.h> please.
ARGH! I tried with a cocoa target and got a error where gl_matrix and gl_color, i think it was them, were unknown symbols...
DudetheCreator Wrote:Ah-Ha! So the tutorial is wrong? And I should add a cocoa target?
Uh, I'm pretty sure it isn't since I've followed it a couple times and have made a GLUT/Carbon based app just fine...
The brains and fingers behind Malarkey Software (plus caretaker of the world's two brattiest felines).
Yes, but I'm not using the source code from the tutorial! I'm using the source code from the Guide to OpenGL Programming! I know, I will blend them! And it WILL WORK!
Right, I have followed the tutorial, but used code I got from the OpenGL book. I get 3766 errors. Is that a record? All the errors are in header files, in framworks, like foundation.framework and cocoa.framework. I think I will start from scratch using my very basic knowledge of OpenGL and make MY OWN code according to te book AND the tutorial.
There is a bug in Xcode where main.c or main.cpp in a Cocoa project will give you vast numbers of errors. This is why you make a Carbon app; not because you really want Carbon.
If you follow the tutorial, then replace the tutorial code with your own, everything should work.
If you follow the tutorial, then replace the tutorial code with your own, everything should work.
That's not a bug. It is invalid to #include a header using Obj-C from C.
You might as well try importing FORTRAN from perl.
You might as well try importing FORTRAN from perl.
Try it - you don't have to import any ObjC headers for it to cause vast numbers of errors.
I thought it had been fixed in Xcode 1.5, but maybe not.
I thought it had been fixed in Xcode 1.5, but maybe not.
Works fine here in Xcode 1.5:
1) new Cocoa Application
2) delete main.m
3) replace it with this main.c:
4) build & run
Result:
0 warnings, 0 errors, "HELLO SAILOR" in the console.
What's the problem?
1) new Cocoa Application
2) delete main.m
3) replace it with this main.c:
Code:
#include <stdio.h>
int main(int argc, char *argv[]) {
printf("HELLO SAILOR\n");
return 0;
}Result:
0 warnings, 0 errors, "HELLO SAILOR" in the console.
What's the problem?
well, it didn't work when I wrote the tutorial, and clearly still doesn't work for some people here

