]> git.saurik.com Git - wxWidgets.git/commitdiff
automatically link with opengl32.lib and glu32.lib when using VC++ (patch 753485)
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 9 Jul 2003 23:18:40 +0000 (23:18 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 9 Jul 2003 23:18:40 +0000 (23:18 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21829 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/glcanvas.cpp

index 2772f79ba40677bcd616aa58cb6f4aa66a09d980..5180f0d6027a6ba621baa8cc40604dab45777318 100644 (file)
 
 #include "wx/glcanvas.h"
 
+/*
+  The following two compiler directives are specific to the Microsoft Visual
+  C++ family of compilers
+
+  Fundementally what they do is instruct the linker to use these two libraries
+  for the resolution of symbols. In essence, this is the equivalent of adding
+  these two libraries to either the Makefile or project file.
+
+  This is NOT a recommended technique, and certainly is unlikely to be used
+  anywhere else in wxWindows given it is so specific to not only wxMSW, but
+  also the VC compiler. However, in the case of opengl support, it's an
+  applicable technique as opengl is optional in setup.h This code (wrapped by
+  wxUSE_GLCANVAS), now allows opengl support to be added purely by modifying
+  setup.h rather than by having to modify either the project or DSP fle.
+
+  See MSDN for further information on the exact usage of these commands.
+*/
+#ifdef _MSC_VER
+#  pragma comment( lib, "opengl32" )
+#  pragma comment( lib, "glu32" )
+#endif
+
 static const wxChar *wxGLCanvasClassName = wxT("wxGLCanvasClass");
 static const wxChar *wxGLCanvasClassNameNoRedraw = wxT("wxGLCanvasClassNR");