Problems with GLUT in Visual C++ .NET 2003

I’m thinking maybe GLUT and VS 2003 just aren’t compatible. After building the glut.dsw in order to get the right files installed, I started getting a link error because the linker couldn’t find OLDNAMES.lib. After repairing my installation of VS 2003 that problem went away. I’m not 100% sure building glut.dsw caused that problem. I just know the problem occurred after the fact.

Many hours later I learned all I needed to install were those 3 important files glut.h, glut32.lib, and glut32.dll thanks to this link:
but I’m still having problems getting some of Mark J. Kilgard’s demos to compile. As far as errors, I’m getting a lot of:
error C2381: ‘exit’ : redefinition;__declspec(noreturn) differs

If anyone knows how to get GLUT to run smoothly on VS 2003, or 2005 I’d like to know.

I’ve learned (and speak from experience) that just the order of the #include directives can cause a problem.

As a side note, if anyone wants to know how to link to the GLUT library in VS 2003 you can find that information at the link above.

Ok, here is an update to my previous post. I thought maybe my compiler didn’t like the precompiled binary files I installed, so I took those out and did a repeat of my prior glut32 build. Unfortunately that didn’t work. When I opened the glut workspace or project or whatever you want to call it I got this message:

"The project ‘glut32.dsp’ must be converted to the current Visual C++ project format. After it has been converted, you will not be able to edit this project in previous versions of Visual Studio.

Convert and open this project?

Yes, no, yes to all, no to all"

I clicked Yes To All

After the project was opened I clicked “Build glut32”.

The following errors showed up after the build:
glut32 warning LNK4075: ignoring ‘/EDITANDCONTINUE’ due to ‘/INCREMENTAL:NO’ specification

c:\OpenGL\GLUT Source Code\glut-3.7.6\lib\glut\glut.def warning LNK4017: DESCRIPTION statement not supported for the target platform; ignored

glut32 error PRJ0019: A tool returned an error code from “Copying libraries, headers & dll’s…”

These were the same errors I got the first time. Needless to say the build was not a success.

I went ahead and checked the places where the three major files (glut.h, glut32.lib, and glut32.dll) should have been installed and they weren’t there.

I don’t get the link error to the OLDNAMES.lib when building an unrelated project this time. I’m at a loss for how that problem occurred.

So there’s a complete rundown of my problems using GLUT with VS 2003.

I don’t really know what to do except put the precompiled binaries back in and ignore all the warning messages. Any help would be appreciated. Maybe someone could mail me an asprin.

As far as errors, I’m getting a lot of:
error C2381: ‘exit’ : redefinition;__declspec(noreturn) differs
I think maybe you need to define GLUT_DISABLE_ATEXIT_HACK before including glut.h.

Never tried to build GLUT myself, but I’ve seen this error come up in other threads. However I’ve never actually encountered this error in VC6, 7 or 8.