Mesa (master): mapi/glapi: Fix dll linkage of GLES1 symbols.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Wed Nov 26 20:31:20 UTC 2014


Module: Mesa
Branch: master
Commit: 5fdb6d683984ff44fca7d89e6716b1085970e993
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5fdb6d683984ff44fca7d89e6716b1085970e993

Author: José Fonseca <jfonseca at vmware.com>
Date:   Tue Nov 25 23:06:25 2014 +0000

mapi/glapi: Fix dll linkage of GLES1 symbols.

This fixes several MSVC warnings like:

  warning C4273: 'glClearColorx' : inconsistent dll linkage

In fact, we should avoid using `declspec(dllexport)` altogether, and use
exclusively the .DEF instead, which gives more precise control of which
symbols must be exported, but all the public GL/GLES headers practically
force us to pick between `declspec(dllexport)` or
`declspec(dllimport)`.

Cc: "10.4" <mesa-stable at lists.freedesktop.org>
Reviewed-by: Brian Paul <brianp at vmware.com>
Reviewed-by: Roland Scheidegger <sroland at vmware.com>

---

 src/mapi/glapi/SConscript |    1 +
 1 file changed, 1 insertion(+)

diff --git a/src/mapi/glapi/SConscript b/src/mapi/glapi/SConscript
index bc1c43a..97ebfe6 100644
--- a/src/mapi/glapi/SConscript
+++ b/src/mapi/glapi/SConscript
@@ -16,6 +16,7 @@ if env['platform'] == 'windows':
     env.Append(CPPDEFINES = [
         '_GDI32_', # prevent gl* being declared __declspec(dllimport) in MS headers
         'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers
+        'KHRONOS_DLL_EXPORTS', # declare gl* as __declspec(dllexport) in Khronos headers
     ])
     if env['gles']:
         env.Append(CPPDEFINES = ['_GLAPI_DLL_EXPORTS'])




More information about the mesa-commit mailing list