View Full Version : compiling error
11-20-2003, 06:49 AM
Hi im getting the following compiling error everytime i try to run opengl
c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1) : warning C4182: #include nesting level is 363 deep; possible infinite recursion
c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1) : fatal error C1076: compiler limit : internal heap limit reached; use /Zm to specify a higher limit
Error executing cl.exe.
Does anybody know what i should do
Have you changed anything in gl.h at all? It shouldn't have any #includes in it so make sure it doesn't.
Also make sure that you don't have any problems with other #include'd files in your application - if you don't prevent recursive includes with "#pragma once" or a surounding #ifdef, then you'll get this type of error. It's possibly nothing to do with gl.h but maybe in another header where you reference it.
11-21-2003, 12:04 AM
Thanks.When i click on the error message it brings me into the glut.h source code and points to #include<gl/gl.h>.I have tried everything to fix the error.Do you know what is the best thing to do is.
If you're including glut.h, don't also #include gl.h in the same source file (as it's not necessary).
Make sure all of your header files are protected from multiple #include's by enclosing each one in an #ifdef, for example
// ... your header goes here
I can't for the moment think of any situation where this shouldn't work (that doesn't mean there isn't one!). If you still can't get it compiling, post your code so we can take a look.
11-24-2003, 08:01 AM
hi,thanks for your help but it didnt work.Iv been told by my teacher to reinstall visual studio and it might work then.Cheers for your help
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.