diff options
author | José Fonseca <jfonseca@vmware.com> | 2009-01-24 13:52:02 +0000 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2011-07-11 20:05:24 +0100 |
commit | 873978d36e0d61b3e4ac947c9f957a15edb7d93f (patch) | |
tree | c02fb5491f5d2d2de448efdc5a1d3e5ce71b821b | |
parent | 67bb9b3fe8dd4fac8db39f9ae9ca6b635590c18b (diff) | |
download | glut-873978d36e0d61b3e4ac947c9f957a15edb7d93f.tar.gz |
glut: Use a new define GLUT_STATIC to distinguish static builds.
_DLL is defined by MSVC when building against a DLL version of the CRT
library. It bears no relation to whether we are building a DLL or not. That
is, we can build a DLL against a static CRT, or a static lib against a
dynamicaly linked CRT. See more detail at
http://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx
This gets DLL version of glut linking correctly both with MinGW and MSVC.
PS: GL/gl.h (and others) must be fixed too.
-rw-r--r-- | include/GL/glut.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/GL/glut.h b/include/GL/glut.h index 6f877f3..f574f1d 100644 --- a/include/GL/glut.h +++ b/include/GL/glut.h @@ -109,9 +109,9 @@ extern _CRTIMP void __cdecl exit(int); #endif /* GLUT API entry point declarations for Win32. */ -#if (defined(BUILD_GLUT32) || defined(GLUT_BUILDING_LIB)) && defined(_DLL) +#if (defined(BUILD_GLUT32) || defined(GLUT_BUILDING_LIB)) && !defined(GLUT_STATIC) # define GLUTAPI __declspec(dllexport) -#elif defined(_DLL) +#elif !defined(GLUT_STATIC) # define GLUTAPI __declspec(dllimport) #else # define GLUTAPI extern |