Re: OpenGL includes not where expected
Re: OpenGL includes not where expected
- Subject: Re: OpenGL includes not where expected
- From: Dallas Hockley <email@hidden>
- Date: Fri, 05 Nov 2004 19:20:55 -0700
On 5-Nov-04, at 8:37 AM, Ken Brooks wrote:
<x-tad-smaller>I downloaded the well-known OpenGL-based GLUI package; its source files contain the line</x-tad-smaller>
<x-tad-smaller>#include <GL/glut.h></x-tad-smaller>
<x-tad-smaller> </x-tad-smaller>
<x-tad-smaller> which could not find the file. I had to change it to:</x-tad-smaller>
<x-tad-smaller>#include <GLUT/glut.h></x-tad-smaller>
Not sure, but I expect this is due to the fact that Mac separates the OpenGL and the GLUT into two separate frameworks (which I believe is a "right thing" to do.
<x-tad-smaller>I hate messing with standard source code like this; was there a better way?</x-tad-smaller>
<x-tad-smaller>Also, I get:</x-tad-smaller>
/Users/ken/Programs/GL c++/GLUI/glui_v2_1_beta/example1.cpp:89: error: `main' must return `int'
<x-tad-smaller>which tells me that XCode is more picky about this than some other compilers. Can I tell it to be less picky?</x-tad-smaller>
Most of the defaults are more strict for sure. That's largely just due to the default headers and default gcc settings. For the main, the prototype of the function either doesn't exist or is at odds with the code. Check that. An error isn't a default for a warning, it's usually indicating that the prototype said the function would be one way, and the function was declared or used the other way.
I've only worked in Objective-C on XCode, so I'm not sure where the -W flags and equivalent would go to adjust the gcc compiler, but looking at the warning levels and arguments to gcc will give you more control than you're likely to ever need. ;-)
Enjoy! Hope that helps.
Dallas
XCode version 1.1, component versions 300.0
Ken Brooks
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden