Still Mac OpengGL problems...
Eaven though great help freom Jeff LaMarche I still have some problems with compling OpenGL programs on the macintosh using Codewarrior 1.7 (cannot afford any newer...) and the latest OpenGL SDK.
I create a new empty project in Codewarrior and add main.c which is the Lesson 1 file from NeHe''s OpenGL tutrials (the mac port of course) and I also add all theese header files (could I be missing any?):
gl/gl.h
gl/glu.h
gl/glut.h
th.h
And then I press the Make button...and I get link errors saying this:
Link Error : main.c: ''glutInitMac'' referenced from ''main'' is undefined.
Link Error : main.c: ''glutInitDisplayMode'' referenced from ''main'' is undefined.
Link Error : main.c: ''glutInitWindowSize'' referenced from ''main'' is undefined.
Link Error : main.c: ''glutInitWindowPosition'' referenced from ''main'' is undefined.
Link Error : main.c: ''glutCreateWindow'' referenced from ''main'' is undefined.
Link Error : main.c: ''glClearColor'' referenced from ''InitGL'' is undefined.
Link Error : main.c: ''glClearDepth'' referenced from ''InitGL'' is undefined.
Link Error : main.c: ''glDepthFunc'' referenced from ''InitGL'' is undefined.
Link Error : main.c: ''glEnable'' referenced from ''InitGL'' is undefined.
Link Error : main.c: ''glShadeModel'' referenced from ''InitGL'' is undefined.
Link Error : main.c: ''glMatrixMode'' referenced from ''InitGL'' is undefined.
Link Error : main.c: ''glLoadIdentity'' referenced from ''InitGL'' is undefined.
Link Error : main.c: ''gluPerspective'' referenced from ''InitGL'' is undefined.
Link Error : main.c: ''glClear'' referenced from ''DrawGLScene'' is undefined.
Link Error : main.c: ''glLoadIdentity'' referenced from ''DrawGLScene'' is undefined.
Link Error : main.c: ''glFlush'' referenced from ''DrawGLScene'' is undefined.
Link Error : main.c: ''glutSwapBuffers'' referenced from ''DrawGLScene'' is undefined.
Link Error : main.c: ''glutDisplayFunc'' referenced from ''main'' is undefined.
Link Error : main.c: ''glViewport'' referenced from ''ReSizeGLScene'' is undefined.
Link Error : main.c: ''glMatrixMode'' referenced from ''ReSizeGLScene'' is undefined.
Link Error : main.c: ''glLoadIdentity'' referenced from ''ReSizeGLScene'' is undefined.
Link Error : main.c: ''gluPerspective'' referenced from ''ReSizeGLScene'' is undefined.
Link Error : main.c: ''glutReshapeFunc'' referenced from ''main'' is undefined.
Link Error : main.c: ''glutMainLoop'' referenced from ''main'' is undefined.
Please help me out, please help me out, I am runnig insane, trying to code SIMPLE OpenGL on the mac for the first time...
Thanks beforehand,
/Sebastian Jensen
-=Moogle=-
Are you including the OpenGL libraries in your project?
that is:
OpenGLLibraryStub
OpenGLMemoryStub
OpenGLUtilityStub
glut.lib
tk.lib
are all these libraries added to your project?
hopefully that will solve your problem
that is:
OpenGLLibraryStub
OpenGLMemoryStub
OpenGLUtilityStub
glut.lib
tk.lib
are all these libraries added to your project?
hopefully that will solve your problem
Thanx alot _Gumby but I can''t still compile ... When I add all the libraries you talked about following errors appears:
Error : Invalid PEF shared library.
OpenGLLibraryStub
Error : Invalid PEF shared library.
OpenGLMemoryStub
Error : Invalid PEF shared library.
OpenGLUtilityStub
Error : Not a 68K library
tk.lib
Weird ain''t it?
Thanx in Advance
/ Sebastian Jensen (Hey, go and see snatch if you are goin on a movie)
Error : Invalid PEF shared library.
OpenGLLibraryStub
Error : Invalid PEF shared library.
OpenGLMemoryStub
Error : Invalid PEF shared library.
OpenGLUtilityStub
Error : Not a 68K library
tk.lib
Weird ain''t it?
Thanx in Advance
/ Sebastian Jensen (Hey, go and see snatch if you are goin on a movie)
-=Moogle=-
I suspect that you are looking at an "upgrade or else" situation. I''m not sure if CodeWarrior 1.7 can weak link to a library (which is necessary for the OpenGL Stub libraries due to the way they are implemented).
If you can''t afford to upgrade CodeWarrior, your other option is Apple MPW, which is a great free development environment by Apple. It certainly lacks CodeWarrior''s ease of use and many of its bells and whistles, and it requires some familiarity with Unix-style makefiles, but armed with a good text editor like BBEdit and MPW, you can do everything you need to do in terms of software development.
If you can find the money, though, you''re better off upgrading CW, because almost all source code available for the Mac will come with a CodeWarrior project (including sample code from Apple), and the integration of the IDE really enhances efficieny.
If you can''t afford to upgrade CodeWarrior, your other option is Apple MPW, which is a great free development environment by Apple. It certainly lacks CodeWarrior''s ease of use and many of its bells and whistles, and it requires some familiarity with Unix-style makefiles, but armed with a good text editor like BBEdit and MPW, you can do everything you need to do in terms of software development.
If you can find the money, though, you''re better off upgrading CW, because almost all source code available for the Mac will come with a CodeWarrior project (including sample code from Apple), and the integration of the IDE really enhances efficieny.
Yeah I thought version 1.7 sounded a little old.
I wonder how much it costs to upgrade?
Anyway, thank you, I am kind of chocked there was others than me on the Macintosh scene. Thanx, for helping me out.
Also, I would like any other OpenGL Mac problems to be posted here (belives the mac dudes gotta help one another)
/Sebastian Jensen
I wonder how much it costs to upgrade?
Anyway, thank you, I am kind of chocked there was others than me on the Macintosh scene. Thanx, for helping me out.
Also, I would like any other OpenGL Mac problems to be posted here (belives the mac dudes gotta help one another)
/Sebastian Jensen
-=Moogle=-
Well, one of the nice things about OpenGL is that 98% of the problems you face while learning OpenGL on the Mac are exactly the same as those you face while learning it on other platforms - but it''s still nice to see an occassional Mac-specific post...
I suggest looking at:
Discover Programming for Macintosh
its a Metrowerks package that comes with a complete IDE. Its fully featured, and you get a couple books with it too(in pdf format)
Its cheap too(well, cheaper than the standard version)
check it out
Discover Programming for Macintosh
its a Metrowerks package that comes with a complete IDE. Its fully featured, and you get a couple books with it too(in pdf format)
Its cheap too(well, cheaper than the standard version)
check it out
The Discover Programming edition only allows compiling 68k binaries - no PPC support. I believe that the OpenGL libraries are PPC-only stub libraries which you can''t use in a 68k program, so Discover Programming isn''t a great deal any more if your intent is to do anything with OpenGL.
I''ve heard that for v.6 they are replacing Discover Programming edition with a less full-featured version of CodeWarrior that does compile PPC code but is cheaper and lacking in some features, so this might be something to look at.
I''ve heard that for v.6 they are replacing Discover Programming edition with a less full-featured version of CodeWarrior that does compile PPC code but is cheaper and lacking in some features, so this might be something to look at.
That is incorrect
The older version of Discover Programming on the Macintosh only allowed 68k compilation, but it has since been updated
Go to the metrowerks site, have a look. It now compiles C/C++ and Java for the PPC and 68k machines.
_Gumby
The older version of Discover Programming on the Macintosh only allowed 68k compilation, but it has since been updated
Go to the metrowerks site, have a look. It now compiles C/C++ and Java for the PPC and 68k machines.
_Gumby
Well, I''ll be...
When I bought Discover Programming, it didn''t support PPC, and I ended up having to upgrade.
I did notice a big downside to the revised version - they''ve made the license much more restrictive: No distribution at all of compiled binaries, even freeware. So, even posting a demo to NeHe would be a violation of the license.
And as always, it seems that the Discover Programming edition is several months behind the full version. While 6.0 has been out for a few months, Discover Programming is still at 5. But that''s not a big deal either unless you plan on doing a lot of Carbon work or want to run the IDE in OS X.
But, there''s an upgrade path to the full version, so with this new information, I have to agree that this is a good place to start, but be prepared to shell out more money if you ever write something you want to distribute.
When I bought Discover Programming, it didn''t support PPC, and I ended up having to upgrade.
I did notice a big downside to the revised version - they''ve made the license much more restrictive: No distribution at all of compiled binaries, even freeware. So, even posting a demo to NeHe would be a violation of the license.
And as always, it seems that the Discover Programming edition is several months behind the full version. While 6.0 has been out for a few months, Discover Programming is still at 5. But that''s not a big deal either unless you plan on doing a lot of Carbon work or want to run the IDE in OS X.
But, there''s an upgrade path to the full version, so with this new information, I have to agree that this is a good place to start, but be prepared to shell out more money if you ever write something you want to distribute.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement