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.
This commit is contained in:
@@ -109,9 +109,9 @@ extern _CRTIMP void __cdecl exit(int);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* GLUT API entry point declarations for Win32. */
|
/* 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)
|
# define GLUTAPI __declspec(dllexport)
|
||||||
#elif defined(_DLL)
|
#elif !defined(GLUT_STATIC)
|
||||||
# define GLUTAPI __declspec(dllimport)
|
# define GLUTAPI __declspec(dllimport)
|
||||||
#else
|
#else
|
||||||
# define GLUTAPI extern
|
# define GLUTAPI extern
|
||||||
|
Reference in New Issue
Block a user