Pascal,

        In your application you only need to include "freeglut.h".  That file includes the other two files, so in essence you are including "freeglut_std.h" twice.  That may be the root of your problems.

        I see a new entry in the documentation coming up:  "Don't include "freeglut.h" and "freeglut_std.h" in the same program file."  The "freeglut_std.h" is for people who want ONLY the GLUT implementation and not the "freeglut" extensions.

John F. Fay
Technical Fellow
Jacobs Technology TEAS Group
850-883-1294

-----Original Message-----
From: freeglut-developer-bounces@lists.sourceforge.net [mailto:freeglut-developer-bounces@lists.sourceforge.net] On Behalf Of Savard, Pascal

Sent: Friday, January 19, 2007 12:46 PM
To: FreeGLUT developers list
Subject: Re: [Freeglut-developer] Multithreaded on Windows

The compiler errors come from the application program project. The freeglut library project compiles without any problems, and outputs a freeglut.lib file, which I have linked in my application. I have also added the three header files "freeglut.h", "freeglut_std.h" and "freeglut_ext.h" in my application project, and replaced the line I had that said "#include <GL\GLUT.h>" with "#include "freeglut.h""

 

When I removed the inclusion of "windows.h" from "freeglut_std.h", I did so at line 48, which seems like the only place where this line is present. I soon realized that OpenGL required that file, so I put it back since it is clear it belongs there. The problem now is making it work without the MFC errors (even though I have no idea why MFC is interrupting the compilation)

 

I'm not too familiar with MFC, is there any other way it could interfere with the application other than by adding it in the project settings?

 

 

 

Pascal Savard

Pascal.Savard@nrc-cnrc.gc.ca

Institute for Information Technology / Institut de technologie de l'information

National Research Council / Conseil national de recherches du Canada

 

 

-----Original Message-----
From: freeglut-developer-bounces@lists.sourceforge.net [mailto:freeglut-developer-bounces@lists.sourceforge.net] On Behalf Of Fay John F Dr CTR USAF AFSEO/SK

Sent: January 19, 2007 1:27 PM
To: 'FreeGLUT developers list'
Subject: Re: [Freeglut-developer] Multithreaded on Windows

 

Pascal,

        There will need to be at least two projects (and two workspaces).  The first one is the project that creates the "freeglut" library that you will use.  The second one will contain the application program.  Which project is giving you all the compiler errors?

        When you removed the inclusion of "windows.h", was that from around line 59 of "freeglut_std.h"?  If so, then trying to build "freeglut" will indeed give you all the compiler errors in "gl.h" that you found, whether you are using MFC or not.

John F. Fay
Technical Fellow
Jacobs Technology TEAS Group
850-883-1294

-----Original Message-----
From: freeglut-developer-bounces@lists.sourceforge.net [mailto:freeglut-developer-bounces@lists.sourceforge.net] On Behalf Of Savard, Pascal

Sent: Friday, January 19, 2007 12:22 PM
To: FreeGLUT developers list
Subject: Re: [Freeglut-developer] Multithreaded on Windows

 

 

Pascal Savard

Pascal.Savard@nrc-cnrc.gc.ca

 

I have considered this, and tried to resolve this issue.

 

Note that I received this code as is, and given the duty to maintain and improve it, therefore I was not there at the time the application was created, and could not confirm whether the application was created as an MFC application or not. The settings in the project (General tab in the project settings) under "Use of MFC" give three choices: "Use standard Windows Librairies" (current setting), "Use MFC in a static librairy" and "Use MFC in a Shared DLL".

 

Since the current option was the furthest one from using MFC as far as I could see, I tried creating a new project, picked "Win32 Console Application" under the Win32 tab, and copied my files in that project and tried again, yet I still get the same errors, and the option in the project settings under Use of MFC are the same.

 

If there is another way to get rid of MFC that I am not aware of I'd gladly use it, but from what I can see the MFC is being called without being included explicitly in the project options.

 

 

 

 

-----Original Message-----
From: freeglut-developer-bounces@lists.sourceforge.net [mailto:freeglut-developer-bounces@lists.sourceforge.net] On Behalf Of Fay John F Dr CTR USAF AFSEO/SK

Sent: January 19, 2007 1:05 PM
To: 'FreeGLUT developers list'
Subject: Re: [Freeglut-developer] Multithreaded on Windows

 

Pascal,

        Perhaps the problem is that you are using MFC?

John F. Fay
Technical Fellow
Jacobs Technology TEAS Group
850-883-1294