Re: GLUT sample codes
Re: GLUT sample codes
- Subject: Re: GLUT sample codes
- From: email@hidden
- Date: Fri, 27 Nov 2009 19:21:28 -0500
On Nov 27, 2009, at 7:01 PM, Carpenter Software wrote:
> Well I went crazy today testing sample code to see if it would compile on Xcode 3+... I may be wrong but GLUT and OpenGL frameworks do not require Cocoa frameworks only require C/C++ libraries in order to function properly!? I am interested as I had said previously in Nate Robins OpenGL tutorials for Mac OSX from the following web site:
>
> http://www.xmission.com/~nate/tutors.html
>
> but it does not compile on Xcode 3+
>
> Also there are two sample codes from Apple that do not compile either:
>
> GLUT.zip and GLUTBasics.zip
>
> http://developer.apple.com/mac/library/samplecode/glut/index.html
>
> http://developer.apple.com/mac/library/samplecode/GLUTBasics/index.html
>
> Although I am not learning these yet, the following also do not compile from Apple sample code on the Xcode 3+.
>
> GLUTStereo.zip
>
> http://developer.apple.com/mac/library/samplecode/GLUTStereo/index.html
>
> GLUT Surface Texture
>
> http://developer.apple.com/mac/library/samplecode/GLUTSurfaceTexture/index.html
>
>
> I hope, really really hope that GLUT will be updated without any geekish politics.
>
> Thanks Jesse.
You might want to provide the exact details of your system. Are you running Leopard or Snow Leopard and what is the exact version of Xcode you are running?
I just tried the GLUTBasics and GLUTSurfaceTexture examples you linked to on 10.6.2 with Xcode 3.2.1 and both compiled and ran (I didn't try the others). I did get a few compiler warnings, but no errors. Here's the build transcript from one of them:
CompileC build/GLUTSurfaceTexture.build/Development/GLUTSurfaceTexture.build/Objects-normal/i386/stanfordbunny.o stanfordbunny.c normal i386 c com.apple.compilers.gcc.4_2
cd /Users/dreed/Downloads/GLUTSurfaceTexture
setenv LANG en_US.US-ASCII
/Developer/usr/bin/gcc-4.2 -x c -arch i386 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -mfix-and-continue -gdwarf-2 -I/Users/dreed/Downloads/GLUTSurfaceTexture/build/GLUTSurfaceTexture.build/Development/GLUTSurfaceTexture.build/GLUTSurfaceTexture.hmap -Wmost -Wno-four-char-constants -Wno-unknown-pragmas -F/Users/dreed/Downloads/GLUTSurfaceTexture/build/Development -I/Users/dreed/Downloads/GLUTSurfaceTexture/build/Development/include -I/Users/dreed/Downloads/GLUTSurfaceTexture/build/GLUTSurfaceTexture.build/Development/GLUTSurfaceTexture.build/DerivedSources/i386 -I/Users/dreed/Downloads/GLUTSurfaceTexture/build/GLUTSurfaceTexture.build/Development/GLUTSurfaceTexture.build/DerivedSources -c /Users/dreed/Downloads/GLUTSurfaceTexture/stanfordbunny.c -o /Users/dreed/Downloads/GLUTSurfaceTexture/build/GLUTSurfaceTexture.build/Development/GLUTSurfaceTexture.build/Objects-normal/i386/stanfordbunny.o
CompileC build/GLUTSurfaceTexture.build/Development/GLUTSurfaceTexture.build/Objects-normal/i386/trackball.o trackball.c normal i386 c com.apple.compilers.gcc.4_2
cd /Users/dreed/Downloads/GLUTSurfaceTexture
setenv LANG en_US.US-ASCII
/Developer/usr/bin/gcc-4.2 -x c -arch i386 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -mfix-and-continue -gdwarf-2 -I/Users/dreed/Downloads/GLUTSurfaceTexture/build/GLUTSurfaceTexture.build/Development/GLUTSurfaceTexture.build/GLUTSurfaceTexture.hmap -Wmost -Wno-four-char-constants -Wno-unknown-pragmas -F/Users/dreed/Downloads/GLUTSurfaceTexture/build/Development -I/Users/dreed/Downloads/GLUTSurfaceTexture/build/Development/include -I/Users/dreed/Downloads/GLUTSurfaceTexture/build/GLUTSurfaceTexture.build/Development/GLUTSurfaceTexture.build/DerivedSources/i386 -I/Users/dreed/Downloads/GLUTSurfaceTexture/build/GLUTSurfaceTexture.build/Development/GLUTSurfaceTexture.build/DerivedSources -c /Users/dreed/Downloads/GLUTSurfaceTexture/trackball.c -o /Users/dreed/Downloads/GLUTSurfaceTexture/build/GLUTSurfaceTexture.build/Development/GLUTSurfaceTexture.build/Objects-normal/i386/trackball.o
CompileC build/GLUTSurfaceTexture.build/Development/GLUTSurfaceTexture.build/Objects-normal/i386/glutSurfaceTexture.o glutSurfaceTexture.c normal i386 c com.apple.compilers.gcc.4_2
cd /Users/dreed/Downloads/GLUTSurfaceTexture
setenv LANG en_US.US-ASCII
/Developer/usr/bin/gcc-4.2 -x c -arch i386 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -mfix-and-continue -gdwarf-2 -I/Users/dreed/Downloads/GLUTSurfaceTexture/build/GLUTSurfaceTexture.build/Development/GLUTSurfaceTexture.build/GLUTSurfaceTexture.hmap -Wmost -Wno-four-char-constants -Wno-unknown-pragmas -F/Users/dreed/Downloads/GLUTSurfaceTexture/build/Development -I/Users/dreed/Downloads/GLUTSurfaceTexture/build/Development/include -I/Users/dreed/Downloads/GLUTSurfaceTexture/build/GLUTSurfaceTexture.build/Development/GLUTSurfaceTexture.build/DerivedSources/i386 -I/Users/dreed/Downloads/GLUTSurfaceTexture/build/GLUTSurfaceTexture.build/Development/GLUTSurfaceTexture.build/DerivedSources -c /Users/dreed/Downloads/GLUTSurfaceTexture/glutSurfaceTexture.c -o /Users/dreed/Downloads/GLUTSurfaceTexture/build/GLUTSurfaceTexture.build/Development/GLUTSurfaceTexture.build/Objects-normal/i386/glutSurfaceTexture.o
/Users/dreed/Downloads/GLUTSurfaceTexture/glutSurfaceTexture.c:113: warning: initialization makes integer from pointer without a cast
/Users/dreed/Downloads/GLUTSurfaceTexture/glutSurfaceTexture.c:114: warning: initialization makes integer from pointer without a cast
/Users/dreed/Downloads/GLUTSurfaceTexture/glutSurfaceTexture.c: In function 'texturereshape':
/Users/dreed/Downloads/GLUTSurfaceTexture/glutSurfaceTexture.c:353: warning: pointer targets in passing argument 2 of 'glDeleteTextures' differ in signedness
/Users/dreed/Downloads/GLUTSurfaceTexture/glutSurfaceTexture.c: In function 'maindisplay':
/Users/dreed/Downloads/GLUTSurfaceTexture/glutSurfaceTexture.c:460: warning: pointer targets in passing argument 2 of 'glGenTextures' differ in signedness
/Users/dreed/Downloads/GLUTSurfaceTexture/glutSurfaceTexture.c: In function 'mainclose':
/Users/dreed/Downloads/GLUTSurfaceTexture/glutSurfaceTexture.c:672: warning: pointer targets in passing argument 2 of 'glDeleteTextures' differ in signedness
/Users/dreed/Downloads/GLUTSurfaceTexture/glutSurfaceTexture.c: In function 'main':
/Users/dreed/Downloads/GLUTSurfaceTexture/glutSurfaceTexture.c:695: warning: 'glutWMCloseFunc' is deprecated (declared at /System/Library/Frameworks/GLUT.framework/Headers/glut.h:469)
/Users/dreed/Downloads/GLUTSurfaceTexture/glutSurfaceTexture.c:708: warning: 'glutWMCloseFunc' is deprecated (declared at /System/Library/Frameworks/GLUT.framework/Headers/glut.h:469)
Ld build/Development/GLUTSurfaceTexture.app/Contents/MacOS/GLUTSurfaceTexture normal i386
cd /Users/dreed/Downloads/GLUTSurfaceTexture
/Developer/usr/bin/gcc-4.2 -arch i386 -L/Users/dreed/Downloads/GLUTSurfaceTexture/build/Development -F/Users/dreed/Downloads/GLUTSurfaceTexture/build/Development -filelist /Users/dreed/Downloads/GLUTSurfaceTexture/build/GLUTSurfaceTexture.build/Development/GLUTSurfaceTexture.build/Objects-normal/i386/GLUTSurfaceTexture.LinkFileList -framework Cocoa -framework GLUT -framework OpenGL -prebind -o /Users/dreed/Downloads/GLUTSurfaceTexture/build/Development/GLUTSurfaceTexture.app/Contents/MacOS/GLUTSurfaceTexture
Touch build/Development/GLUTSurfaceTexture.app
cd /Users/dreed/Downloads/GLUTSurfaceTexture
/usr/bin/touch -c /Users/dreed/Downloads/GLUTSurfaceTexture/build/Development/GLUTSurfaceTexture.app
Dave
_______________________________________________
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