Sigh... So i think I know what the problem is... potentially. 

I've been trying to do OpenGL 4.0 development but of course Mac OS will only let you do OpenGL 2.1

If I remove the SetOption Command it does work though. 

Anyway, thanks for the help.

-Jon

On Thu, Jul 28, 2011 at 4:45 PM, Fay, John F Dr CTR USAF AFMC AAC/XRS <john.fay.ctr@eglin.af.mil> wrote:
Jon,

       I invite you to look at one of the demo programs that is given
on the "freeglut" web site on SourceForge.  I think the
"glutInitContext" calls are new enough that we don't have a demo for any
of them, but they do show the "glutInitWindowSize" and
"glutInitDisplayMode" functions being called before "glutInit".  My
guess is that you need to move those two calls further up in your code.

John F. Fay
Technical Fellow, Modeling and Simulation
Jacobs Technology / TEAS Group
P.O. Box 1935, Eglin AFB, FL  32542-5000
850-883-3496


-----Original Message-----
From: Jon Keon [mailto:jon.keon@gmail.com]
Sent: Thursday, July 28, 2011 3:32 PM
To: FreeGLUT developers list
Subject: Re: [Freeglut-developer] Setting Up FreeGlut on a Mac with
EclipseCDT

Thanks John,

So having -lglut did the trick however I'm getting the following error
with this sample code (truncated to the relevant part)

CODE:

glutInit(&argc, argv);




glutInitContextVersion(4, 0);

glutInitContextFlags(GLUT_FORWARD_COMPATIBLE);

glutInitContextProfile(GLUT_CORE_PROFILE);




glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE,
GLUT_ACTION_GLUTMAINLOOP_RETURNS);




glutInitWindowSize(CurrentWidth, CurrentHeight);




glutInitDisplayMode(GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGBA);




WindowHandle = glutCreateWindow(WINDOW_TITLE_PREFIX);


ERROR:

freeglut  ERROR:  Function <glutSetOption> called without first calling
'glutInit'.








On Thu, Jul 28, 2011 at 1:39 PM, Fay, John F Dr CTR USAF AFMC AAC/XRS
<john.fay.ctr@eglin.af.mil> wrote:


       Jon,

              One comment is that I find it rather surprising that
Apple would
       put its OpenGL include files in a non-standard bottom-level
directory.

              A second and more pertinent comment is that the
"-framework
       GLUT" may point to a different "libglut" library file than the
one which
       you just built.  I don't know whether the four undefined symbols
you
       listed are all of them or just the first four, but three of them
are not
       standard GLUT.  If none of the "freeglut" functions are defined,
you may
       need to include a "-lglut" argument on your command line.

       John F. Fay
       Technical Fellow, Modeling and Simulation
       Jacobs Technology / TEAS Group
       P.O. Box 1935, Eglin AFB, FL  32542-5000
       850-883-3496


       -----Original Message-----
       From: Jon Keon [mailto:jon.keon@gmail.com]
       Sent: Thursday, July 28, 2011 7:54 AM
       To: freeglut-developer@lists.sourceforge.net
       Subject: [Freeglut-developer] Setting Up FreeGlut on a Mac with
Eclipse
       CDT


       Hi All,

       I'm having a heck of a time trying to get FreeGlut up and
running on my
       Mac using Eclipse CDT and I was hoping I could get some help.

       I downloaded the tar for 2.6.0 and had to follow the
instructions here
       in order for it to properly extract and make without errors.

       http://lookass.ch/?id=4&area=art&art=221
       tar -xzf freeglut-2.6.0.tar.gz
       cd freeglut-2.6.0
       ./autogen.sh
       CPPFLAGS="-I/usr/X11R6/include" ./configure
--prefix="${PWD}/../"
       make
       make install


       This created two directories, once called include and one called
lib. In
       the include there is the GL folder with freeglut_ext.h,
freeglut_std.h,
       freeglut.h and glut.h. In the lib folder there is
libglut.3.dylib,
       libglut.a, libglut.dylib and libglut.la.


       So naturally in Eclipse I pointed the include directory to the
include
       folder and added the lib folder to library paths.


       This allowed me to include freeglut.h properly but when i went
to build
       it would error since it couldn't find GL/gl.h and GL/glu.h.


       Since I'm on a mac, those files are part of the OpenGL framework
on the
       OS so i modified the freeglut_std.h so it reads:


       #if defined(__APPLE__)
       #include <OpenGL/gl.h>
       #include <OpenGL/glu.h>
       #else
       #include <GL/gl.h>
       #include <GL/glu.h>
       #endif

       This fixed the include build error but now I have the following
errors
       which seems like the linker is not finding the libraries
properly. Can
       anyone help me out with what to do next?


       make all

       Building target: CPPHelloWorld

       Invoking: MacOS X C++ Linker

       g++ -L/OpenGL/FreeGlut_2.6.0_Release/lib -framework OpenGL
-framework
       GLUT -framework Cocoa -o "CPPHelloWorld"  ./src/CPPHelloWorld.o

       Undefined symbols:

        "_glutInitContextProfile", referenced from:

            Initialize(int, char**)in CPPHelloWorld.o

        "_glutSetOption", referenced from:

            Initialize(int, char**)in CPPHelloWorld.o

        "_glutInitContextFlags", referenced from:

            Initialize(int, char**)in CPPHelloWorld.o

        "_glutInitContextVersion", referenced from:

            Initialize(int, char**)in CPPHelloWorld.o

       ld: symbol(s) not found

       collect2: ld returned 1 exit status

       make: *** [CPPHelloWorld] Error 1




------------------------------------------------------------------------
------
       Got Input?   Slashdot Needs You.
       Take our quick survey online.  Come on, we don't ask for help
often.
       Plus, you'll get a chance to win $100 to spend on ThinkGeek.
       http://p.sf.net/sfu/slashdot-survey
       _______________________________________________
       Freeglut-developer mailing list
       Freeglut-developer@lists.sourceforge.net
       https://lists.sourceforge.net/lists/listinfo/freeglut-developer




------------------------------------------------------------------------------
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
Freeglut-developer mailing list
Freeglut-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freeglut-developer