Hello and welcome to the "freeglut" community.

        I don't think we have ever tried building "freeglut" in a multi-threaded mode.

        The first thing I see is that you are also compiling an MFC application.  MFC is its own windowing system, I think; I don't know that we have ever run "freeglut" on MFC either.  So there are two unknowns here.

        All that said, I am one of the primary maintainers of "freeglut" and am active on the Windows side, and am interested in helping if possible.  So I don't think you are wasting your time here; at the very least, I would like to see to it that you aren't.

        We will not be able to remove it based on a test for "_WINDOWS_" because MSVC6 will still need it.  But that is a detail that we will be able to handle later.

        What are the errors you get when you remove "windows.h" from "freeglut_std.h"?

John F. Fay
Technical Fellow
Jacobs/Sverdrup TEAS Group

-----Original Message-----
From: [] On Behalf Of Savard, Pascal

Sent: Thursday, January 18, 2007 1:24 PM
Subject: [Freeglut-developer] Multithreaded on Windows



I've been maintaining an application for a few months. This application uses OpenGL and GLUT to handle the graphical part.


Last week we migrated the application from MS Visual Studio 6 to MS Visual Studio 8 (2005).


The problem I'm facing now is that MSVC8 has completely removed the Single threaded compilation option.


As far as I can see, the application compiles and works like that while in Debug mode, but we receive linking errors on every GLUT function when we compile in Release mode.


I have therefore begun searching for an alternative to GLUT which would let us compile in Release mode using MSVC8. This is how I found freeglut.


I did some research and couldn't find the answers to my questions, so here it goes


Does freeglut support multithreaded compilation? I tried to replace GLUT with freeglut in my application, but cant seem to get it working because of an error


c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxv_w32.h(16) : fatal error C1189: #error :  WINDOWS.H already included.  MFC apps must not #include <windows.h>


The windows.h file was already included to the project prior to switching to freeglut, and didn't give us any problems.


I tried putting every declaration between #ifndef _WINDOWS_  and get the same error.

Removing the declaration from either that afxv_w32.h or freeglut_std.h both generate a bunch of errors.



So am I wasting my time? If freeglut does support multithreaded I'd like to get it to work, but if not ill have to find another alternative to using the GLUT-based libraries.


Thanks for your help



Pascal Savard

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

National Research Council / Conseil national de recherches du Canada

Ottawa, Ontario