Building libEGL and libGLESv2 as static libraries on Windows

3,702 views
Skip to first unread message

Tibor den Ouden

unread,
Dec 9, 2015, 9:01:44 AM12/9/15
to angleproject
If I change 'angle_gl_library_type%' to 'static_library'
in angle.gyp (line 21) and run glient runhooks,
I can build static libs for libEGL and libGLESv2

Only when I start linking them to an application (hello_triangle for instance)
I get unresolved symbols.
This is due to the exported functions still containing the dll interface calling conventions.
By changing the following lines in : angle/include/export.h :
#if defined(_WIN32)
#   if defined(LIBGLESV2_IMPLEMENTATION) || defined(LIBANGLE_IMPLEMENTATION)
#       define ANGLE_EXPORT __declspec(dllexport)
#   else
#       define ANGLE_EXPORT __declspec(dllimport)
#   endif
#elif defined(__GNUC__)
to :
#if defined(_WIN32)
#   if defined(LIBGLESV2_IMPLEMENTATION) || defined(LIBANGLE_IMPLEMENTATION)
#       define ANGLE_EXPORT 
#   else
#       define ANGLE_EXPORT 
#   endif
#elif defined(__GNUC__)

And in : angle/include/KHR/khrplatform.h :
#if defined(_WIN32) && !defined(__SCITECH_SNAP__)
#   define KHRONOS_APICALL __declspec(dllimport)
#elif defined (__SYMBIAN32__)
to :
#if defined(_WIN32) && !defined(__SCITECH_SNAP__)
#   define KHRONOS_APICALL 
#elif defined (__SYMBIAN32__)
that is solved.

For applications for which the project files are not generated from .gyp files
you have to add d3d9.lib to the Linker Input as Additional Dependencies for release builds.
For debug builds you have to add d3d9.lib and dxguid.lib.

Is there a 'default' way to change the dll interface calling conventions for static libs ?

Otherwise, if building libEGL and libGLESv2 as static libraries on Windows is still supported,
I can provide a changelist to fix the calling conventions for ANGLE_EXPORT and KHRONOS_APICALL.
I think a new preprocessor define is needed :
ANGLE_STATIC_LIBS, ANGLE_BUILD_STATIC_LIBS ?

Jamie Madill

unread,
Dec 9, 2015, 9:06:22 AM12/9/15
to Tibor Ouden, den, angleproject
Hey Tibor,

Can you open an issue on the issue tracker for this?

I agree that we'll likely need a new define, and that the new define has the effect of turning off the dllexoprt/dllimport.

--
You received this message because you are subscribed to the Google Groups "angleproject" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angleproject...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tibor den Ouden

unread,
Dec 9, 2015, 9:51:26 AM12/9/15
to angleproject, tibord...@gmail.com
Issue tracker :

(Fix calling conventions for building libEGL and libGLESv2 as static libraries on Windows)


Op woensdag 9 december 2015 15:06:22 UTC+1 schreef Jamie Madill:

Mark Callow

unread,
Dec 9, 2015, 10:04:55 PM12/9/15
to tibord...@gmail.com, angleproject
On Dec 9, 2015, at 11:51 PM, Tibor den Ouden <tibord...@gmail.com> wrote:

Issue tracker :

(Fix calling conventions for building libEGL and libGLESv2 as static libraries on Windows)


All you need do is -DGL_APICALL -DEGLAPI on the compile command when compiling the library. That is because the gl*platform.h files contain

#ifndef GL_APICALL
#define GL_APICALL  KHRONOS_APICALL
#endif

and eglplatform.h contains

#ifndef EGLAPI
#define EGLAPI KHRONOS_APICALL
#endif

Users of a static library will also need to add these defines to their compile commands.

These are the same macros you need to define differently when building a shared library (at least on Windows you have to change import to export).

Regards

    -Mark


signature.asc

ja...@clarkezone.io

unread,
Aug 12, 2018, 10:32:44 AM8/12/18
to angleproject
I also have a requirement to build static libs on Windows.  Is there an "out of the box" way of doing this that doesn't require any source changes?  If yes, what are the steps?

thx

James 

wdfsh...@gmail.com

unread,
Dec 23, 2018, 11:31:37 PM12/23/18
to angleproject
Is there an "out of the box" way of doing this that doesn't require any source changes? https://www.wdfshare.com/attack-on-titan-2-full-repack.html

James Clarke

unread,
Jun 5, 2019, 12:17:01 AM6/5/19
to angleproject
It appears that static libraries are now created by default by the windows build.  I'm having trouble consuming them, though.

I've had to define:

#define GL_GLEXT_PROTOTYPES
#define EGL_EGL_PROTOTYPES

in order to make things compile but when i attempt to call eg eglinitialize

if (eglInitialize(mEglDisplay, NULL, NULL) == EGL_FALSE)

I get a linker error

1>AngleRenderer.lib(OpenGLES.obj) : error LNK2019: unresolved external symbol __imp_eglInitialize referenced in function "private: void __cdecl OpenGLES::Initialize(void)" (?Initialize@OpenGLES@@AEAAXXZ)

I've looked at the static lib in dump bin and it appears to be exporting eglInitialize, not __imp_eglInitialize.. 

I too need an out of the box way to do this as I'm attempting to link angle in to the flutter engine and hence it needs to be vanilla angle referenced by GN.

Geoff Lang

unread,
Jun 5, 2019, 10:27:00 AM6/5/19
to ja...@clarkezone.io, angleproject
I think we currently only test with the static libraries on Android (in Chrome) and it's done by loading all entry points out of eglGetProcAddress so it looks like something broke on Windows.  Can you file a bug about it? Any more investigations would help us fix it faster.

--
You received this message because you are subscribed to the Google Groups "angleproject" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angleproject...@googlegroups.com.

James Clarke

unread,
Jun 5, 2019, 12:38:50 PM6/5/19
to Geoff Lang, angleproject
will do.

Sent from my iPad

James Clarke

unread,
Jun 5, 2019, 12:59:30 PM6/5/19
to Geoff Lang, angleproject
I filed this:


Can provide a reduced repro if that would be helpful

Sent from my iPad

Mark Callow

unread,
Jun 5, 2019, 1:06:11 PM6/5/19
to ja...@clarkezone.io, Geoff Lang, angleproject
I think you are using a very old version of the OpenGL ES header or the wrong header (i.e. an Open GL header). Current headers #define GL_GLES_PROTOTYPES and do not use GL_GLEXT_PROTOTYPES and there is no #ifdef on EGL_EGL_PROTOTYPES in the current egl.h.

Regards

    -Mark
signature.asc

Mark Callow

unread,
Jun 5, 2019, 1:15:21 PM6/5/19
to ja...@clarkezone.io, angleproject


On Jun 4, 2019, at 21:17, James Clarke <ja...@clarkezone.io> wrote:

1>AngleRenderer.lib(OpenGLES.obj) : error LNK2019: unresolved external symbol __imp_eglInitialize referenced in function "private: void __cdecl OpenGLES::Initialize(void)" (?Initialize@OpenGLES@@AEAAXXZ)


And this part is not an ANGLE issue. A static library should not have symbols defined with __imp. Your application has been compiled to link with a dynamic library.  One way to make it compile for a static library is what Pada wrote in that old message you quoted. The official way is

-DKHRONOS_STATIC

which will result in KHRONOS_APICALL being defined as an empty string for both OpenGL ES and EGL instead of as __dllimport.

Regards

    -Mark

signature.asc

Jamie Madill

unread,
Jun 5, 2019, 1:17:26 PM6/5/19
to Mark Callow, ja...@clarkezone.io, angleproject
It's possible I broke the standard Khronos way with one of my redesigns. It did involve tweaking the headers to be non-standard for some older headers like egl.h.

--
You received this message because you are subscribed to the Google Groups "angleproject" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angleproject...@googlegroups.com.

Mark Callow

unread,
Jun 5, 2019, 2:12:18 PM6/5/19
to jma...@chromium.org, ja...@clarkezone.io, angleproject


On Jun 5, 2019, at 10:18, Jamie Madill <jma...@chromium.org> wrote:

It's possible I broke the standard Khronos way with one of my redesigns. It did involve tweaking the headers to be non-standard for some older headers like egl.h.

I don’t think you have any problem with the ANGLE static library build for Windows. The only issue is compiling the app to link with a static library.  One or both of -DGL_APICALL -DEGLAPI or -DKHRONOS_STATIC needs to work.

Which version of egl.h are you referring to? Old versions of egl.h defaulted to static, i.e #define EGLAPI extern. Newer ones use eglplatform.h which in turn uses KHR/khrplatform.h. 

No Khronos egl.h has ever used an EGL_EGL_PROTOTYPES macro. Every version has the prototypes defined unconditionally.

Regards

    -Mark

signature.asc

Jamie Madill

unread,
Jun 5, 2019, 2:24:33 PM6/5/19
to Mark Callow, ja...@clarkezone.io, angleproject
I made custom headers for EGL.h and GLES 1.x. I needed some features (function pointer types, prototype guards) that weren't enabled for the default headers. I used the Khronos generators. More detail (but only barely) here:

Mark Callow

unread,
Jun 5, 2019, 6:51:12 PM6/5/19
to Jamie Madill, ja...@clarkezone.io, angleproject

On Jun 5, 2019, at 11:24, Jamie Madill <jma...@chromium.org> wrote:

I made custom headers for EGL.h and GLES 1.x. I needed some features (function pointer types, prototype guards) that weren't enabled for the default headers. I used the Khronos generators. More detail (but only barely) here:


Is the guard defined by default? I couldn’t tell from the brief detail at the link. It should be for compatibility with real egl.h and with the OpenGL ES header.

Regards

    -Mark

signature.asc

James Clarke

unread,
Jun 10, 2019, 3:56:56 PM6/10/19
to angleproject
I just updated the bug with a reduced repro for my scenario.

Mark Callow

unread,
Jun 10, 2019, 8:28:34 PM6/10/19
to ja...@clarkezone.io, angleproject


On Jun 10, 2019, at 12:56, James Clarke <ja...@clarkezone.io> wrote:

I just updated the bug with a reduced repro for my scenario.

I’m not an ANGLE project member so I can’t add any comments to the bug so I’ll give feedback here.

I repeat. The link error is NOT an ANGLE bug. Most users on Windows use dlls so the header defaults are set so that applications will be compiled to link with a dll. That’s the __imp you are seeing. You have to define the macros previously mentioned in order for your app to be compiled to link with a static library.

Re the issue with EGL_EGL_PROTOTYPES. It is the intention in all Khronos headers that use such a construct that you should #define FOO_FOO_PROTOTYPES=1. This is so those using runtime loading of function pointers can turn off the prototypes with -DFOO_FOO_PROTOTYPES=0. Some build systems don’t support undef very well.

ANGLE needs to add

#ifndef EGL_EGL_PROTOTYPES
#define EGL_EGL_PROTOTYPES 1
#endif

to its header to so that the prototypes are there by default. That will make their header compatible with the standard egl.h and with the usage of the OpenGL ES headers. This is the only ANGLE bug that I see.

I do not know why you think you need GL_GLEXT_PROTOTYPES. The ANGLE GLES/gl3.h, which looks like the Khronos standard header, like that header uses GL_GLES_PROTOTYPES and defines it as 1 with a code block like the above. GL_GLEXT_PROTOTYPES is used only in gl*ext.h. I don’t know of any implementations that make extension functions available for link time resolution so there isn’t much need to ever define it.

Regards

    -Mark

signature.asc

Jamie Madill

unread,
Jul 16, 2019, 4:37:01 PM7/16/19
to Mark Callow, ja...@clarkezone.io, angleproject
Thanks Mark, following up on this older post. Filed http://anglebug.com/3706 and working on it now.

--
You received this message because you are subscribed to the Google Groups "angleproject" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angleproject...@googlegroups.com.

Oliver Larkin

unread,
Nov 9, 2019, 1:25:58 PM11/9/19
to angleproject
What’s the current status of this? Does the default build create static libraries or do I need to set some arguments? Thanks

Oliver Larkin

unread,
Nov 12, 2019, 12:06:26 PM11/12/19
to angleproject
I followed the DevSetup.md instructions. I saw some .libs built in \obj which look like they should work, but when i try and link I get an error 

C:\Users\oli\Dev\angle\out\Debug\obj\libGLESv2_static.lib : fatal error LNK1127: library is corrupt

I had to define the following as discussed above

GL_APICALL=;EGLAPI=

anyone know what the issue might be there?

thanks

oli

Geoff Lang

unread,
Nov 12, 2019, 1:01:47 PM11/12/19
to olil...@gmail.com, angleproject
Corrupt lib could be a bunch of things.  Is there a 32/64-bit conflict?  Also try wiping the out directory and rebuild.

--
You received this message because you are subscribed to the Google Groups "angleproject" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angleproject...@googlegroups.com.

Oliver Larkin

unread,
Nov 12, 2019, 3:50:47 PM11/12/19
to Geoff Lang, angleproject
building via the visual studio solution gave me 2 much more reasonable size .lib files with don't give that error at link stage. Unfortunately now i get a tonne of linker errors.

Are there any instructions for static linking somewhere?

thanks

oli



1>------ Build started: Project: ConsoleApplication3, Configuration: Debug x64 ------
1>ConsoleApplication3.cpp
1>   Creating library C:\Users\oli\Dev\Experiments\ConsoleApplication3\x64\Debug\ConsoleApplication3.lib and object C:\Users\oli\Dev\Experiments\ConsoleApplication3\x64\Debug\ConsoleApplication3.exp
1>libGLESv2_static.lib(entry_points_gles_3_2_autogen.obj) : error LNK2001: unresolved external symbol "public: __cdecl gl::ScopedPerfEventHelper::ScopedPerfEventHelper(char const *,...)" (??0ScopedPerfEventHelper@gl@@QEAA@PEBDZZ)
1>libGLESv2_static.lib(entry_points_gles_ext_autogen.obj) : error LNK2001: unresolved external symbol "public: __cdecl gl::ScopedPerfEventHelper::ScopedPerfEventHelper(char const *,...)" (??0ScopedPerfEventHelper@gl@@QEAA@PEBDZZ)
1>libGLESv2_static.lib(entry_points_egl.obj) : error LNK2001: unresolved external symbol "public: __cdecl gl::ScopedPerfEventHelper::ScopedPerfEventHelper(char const *,...)" (??0ScopedPerfEventHelper@gl@@QEAA@PEBDZZ)
1>libGLESv2_static.lib(entry_points_egl_ext.obj) : error LNK2001: unresolved external symbol "public: __cdecl gl::ScopedPerfEventHelper::ScopedPerfEventHelper(char const *,...)" (??0ScopedPerfEventHelper@gl@@QEAA@PEBDZZ)
1>libGLESv2_static.lib(entry_points_gles_1_0_autogen.obj) : error LNK2001: unresolved external symbol "public: __cdecl gl::ScopedPerfEventHelper::ScopedPerfEventHelper(char const *,...)" (??0ScopedPerfEventHelper@gl@@QEAA@PEBDZZ)
1>libGLESv2_static.lib(entry_points_gles_2_0_autogen.obj) : error LNK2001: unresolved external symbol "public: __cdecl gl::ScopedPerfEventHelper::ScopedPerfEventHelper(char const *,...)" (??0ScopedPerfEventHelper@gl@@QEAA@PEBDZZ)
1>libGLESv2_static.lib(entry_points_gles_3_0_autogen.obj) : error LNK2001: unresolved external symbol "public: __cdecl gl::ScopedPerfEventHelper::ScopedPerfEventHelper(char const *,...)" (??0ScopedPerfEventHelper@gl@@QEAA@PEBDZZ)
1>libGLESv2_static.lib(entry_points_gles_3_1_autogen.obj) : error LNK2001: unresolved external symbol "public: __cdecl gl::ScopedPerfEventHelper::ScopedPerfEventHelper(char const *,...)" (??0ScopedPerfEventHelper@gl@@QEAA@PEBDZZ)
1>libGLESv2_static.lib(entry_points_gles_3_2_autogen.obj) : error LNK2001: unresolved external symbol "public: __cdecl gl::ScopedPerfEventHelper::~ScopedPerfEventHelper(void)" (??1ScopedPerfEventHelper@gl@@QEAA@XZ)
1>libGLESv2_static.lib(entry_points_gles_ext_autogen.obj) : error LNK2001: unresolved external symbol "public: __cdecl gl::ScopedPerfEventHelper::~ScopedPerfEventHelper(void)" (??1ScopedPerfEventHelper@gl@@QEAA@XZ)
1>libGLESv2_static.lib(entry_points_egl.obj) : error LNK2001: unresolved external symbol "public: __cdecl gl::ScopedPerfEventHelper::~ScopedPerfEventHelper(void)" (??1ScopedPerfEventHelper@gl@@QEAA@XZ)
1>libGLESv2_static.lib(entry_points_egl_ext.obj) : error LNK2001: unresolved external symbol "public: __cdecl gl::ScopedPerfEventHelper::~ScopedPerfEventHelper(void)" (??1ScopedPerfEventHelper@gl@@QEAA@XZ)
1>libGLESv2_static.lib(entry_points_gles_1_0_autogen.obj) : error LNK2001: unresolved external symbol "public: __cdecl gl::ScopedPerfEventHelper::~ScopedPerfEventHelper(void)" (??1ScopedPerfEventHelper@gl@@QEAA@XZ)
1>libGLESv2_static.lib(entry_points_gles_2_0_autogen.obj) : error LNK2001: unresolved external symbol "public: __cdecl gl::ScopedPerfEventHelper::~ScopedPerfEventHelper(void)" (??1ScopedPerfEventHelper@gl@@QEAA@XZ)
1>libGLESv2_static.lib(entry_points_gles_3_0_autogen.obj) : error LNK2001: unresolved external symbol "public: __cdecl gl::ScopedPerfEventHelper::~ScopedPerfEventHelper(void)" (??1ScopedPerfEventHelper@gl@@QEAA@XZ)
1>libGLESv2_static.lib(entry_points_gles_3_1_autogen.obj) : error LNK2001: unresolved external symbol "public: __cdecl gl::ScopedPerfEventHelper::~ScopedPerfEventHelper(void)" (??1ScopedPerfEventHelper@gl@@QEAA@XZ)
1>libGLESv2_static.lib(entry_points_gles_1_0_autogen.obj) : error LNK2019: unresolved external symbol "enum gl::AlphaTestFunc __cdecl gl::FromGLenum<enum gl::AlphaTestFunc>(unsigned int)" (??$FromGLenum@W4AlphaTestFunc@gl@@@gl@@YA?AW4AlphaTestFunc@0@I@Z) referenced in function "enum gl::AlphaTestFunc __cdecl gl::FromGL<enum gl::AlphaTestFunc,unsigned int>(unsigned int)" (??$FromGL@W4AlphaTestFunc@gl@@I@gl@@YA?AW4AlphaTestFunc@0@I@Z)
1>libGLESv2_static.lib(entry_points_gles_ext_autogen.obj) : error LNK2001: unresolved external symbol "enum gl::AlphaTestFunc __cdecl gl::FromGLenum<enum gl::AlphaTestFunc>(unsigned int)" (??$FromGLenum@W4AlphaTestFunc@gl@@@gl@@YA?AW4AlphaTestFunc@0@I@Z)
1>libGLESv2_static.lib(entry_points_gles_1_0_autogen.obj) : error LNK2019: unresolved external symbol "enum gl::ClientVertexArrayType __cdecl gl::FromGLenum<enum gl::ClientVertexArrayType>(unsigned int)" (??$FromGLenum@W4ClientVertexArrayType@gl@@@gl@@YA?AW4ClientVertexArrayType@0@I@Z) referenced in function "enum gl::ClientVertexArrayType __cdecl gl::FromGL<enum gl::ClientVertexArrayType,unsigned int>(unsigned int)" (??$FromGL@W4ClientVertexArrayType@gl@@I@gl@@YA?AW4ClientVertexArrayType@0@I@Z)
1>libGLESv2_static.lib(entry_points_gles_ext_autogen.obj) : error LNK2001: unresolved external symbol "enum gl::ClientVertexArrayType __cdecl gl::FromGLenum<enum gl::ClientVertexArrayType>(unsigned int)" (??$FromGLenum@W4ClientVertexArrayType@gl@@@gl@@YA?AW4ClientVertexArrayType@0@I@Z)
1>libGLESv2_static.lib(entry_points_gles_1_0_autogen.obj) : error LNK2019: unresolved external symbol "enum gl::LightParameter __cdecl gl::FromGLenum<enum gl::LightParameter>(unsigned int)" (??$FromGLenum@W4LightParameter@gl@@@gl@@YA?AW4LightParameter@0@I@Z) referenced in function "enum gl::LightParameter __cdecl gl::FromGL<enum gl::LightParameter,unsigned int>(unsigned int)" (??$FromGL@W4LightParameter@gl@@I@gl@@YA?AW4LightParameter@0@I@Z)
1>libGLESv2_static.lib(entry_points_gles_ext_autogen.obj) : error LNK2001: unresolved external symbol "enum gl::LightParameter __cdecl gl::FromGLenum<enum gl::Li

...

Geoff Lang

unread,
Nov 12, 2019, 4:20:16 PM11/12/19
to Oliver Larkin, angleproject
To preface this, the _static.lib stuff isn't used very often, so we don't have too much experience debugging issues with it.

I wonder if there are more libs you have to link to get this working.  I suspect there is a libANGLE.lib and possibly others (common.lib?) that you can try linking too.  The missing symbols I see (ScopedPerfEventHelper and gl::FromGLenum) would be part of a common.lib.

Nespre t

unread,
Jan 26, 2020, 9:23:04 AM1/26/20
to angleproject
This feature could be a great addition, especially on UWP.
Right now, there are a lot of missing symbols.


Oliver Larkin

unread,
Jan 27, 2020, 8:24:55 AM1/27/20
to angleproject
It would be great if the gn/ninja scripts could make working static libs out of the box, still haven’t managed to make that work


On 26 Jan 2020, at 14:23, Nespre t <nespr...@gmail.com> wrote:

This feature could be a great addition, especially on UWP.
Right now, there are a lot of missing symbols.



--
You received this message because you are subscribed to a topic in the Google Groups "angleproject" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angleproject/xKmUgKZFpgY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angleproject...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/angleproject/7474a2c8-b422-4d5e-bbf5-7917eb558fb6%40googlegroups.com.

Geoff Lang

unread,
Jan 27, 2020, 10:28:39 AM1/27/20
to olil...@gmail.com, angleproject
Could you post what fails to link?

You received this message because you are subscribed to the Google Groups "angleproject" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angleproject...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/angleproject/3A8768F5-C561-473E-B1B3-05C05461472E%40googlemail.com.

Nespre t

unread,
Jan 27, 2020, 10:40:49 AM1/27/20
to angleproject
The following static libraries are used in my build:

C:\dev\libraries\angleproject\out\uwp_win32_release\obj\libEGL_static.lib
C:\dev\libraries\angleproject\out\uwp_win32_release\obj\libGLESv2_static.lib

Current msvc report:

"C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj" (build target) (1) ->
(Link target) ->
  herschel_uwp
.obj : error LNK2001: unresolved external symbol __imp__glUseProgram@4 [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
  herschel_uwp
.obj : error LNK2001: unresolved external symbol __imp__glDisable@4 [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
  herschel_uwp
.obj : error LNK2001: unresolved external symbol __imp__glClearColor@16 [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
  herschel_uwp
.obj : error LNK2001: unresolved external symbol __imp__glClearDepthf@4 [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
  herschel_uwp
.obj : error LNK2001: unresolved external symbol __imp__glClear@4 [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
  herschel_uwp
.obj : error LNK2001: unresolved external symbol __imp__glVertexAttribPointer@24 [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
  herschel_uwp
.obj : error LNK2001: unresolved external symbol __imp__glEnableVertexAttribArray@4 [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
  herschel_uwp
.obj : error LNK2001: unresolved external symbol __imp__glDrawArrays@12 [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
  herschel_uwp
.obj : error LNK2001: unresolved external symbol __imp__eglSwapBuffers@8 [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
  herschel_uwp
.obj : error LNK2001: unresolved external symbol __imp__glIsProgram@4 [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
  herschel_uwp
.obj : error LNK2001: unresolved external symbol __imp__glDeleteProgram@4 [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
  angle_gl
.obj : error LNK2001: unresolved external symbol __imp__eglGetProcAddress@4 [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
  angle_gl
.obj : error LNK2001: unresolved external symbol __imp__eglInitialize@12 [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
  angle_gl
.obj : error LNK2001: unresolved external symbol __imp__eglChooseConfig@20 [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
  angle_gl
.obj : error LNK2001: unresolved external symbol __imp__eglCreateWindowSurface@16 [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
  angle_gl
.obj : error LNK2001: unresolved external symbol __imp__eglCreateContext@16 [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
  angle_gl
.obj : error LNK2001: unresolved external symbol __imp__eglMakeCurrent@16 [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
  angle_gl
.obj : error LNK2001: unresolved external symbol __imp__eglDestroySurface@8 [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
  angle_gl
.obj : error LNK2001: unresolved external symbol __imp__eglDestroyContext@8 [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
  angle_gl
.obj : error LNK2001: unresolved external symbol __imp__eglTerminate@4 [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
  angle_gl
.obj : error LNK2001: unresolved external symbol __imp__glCreateShader@4 [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
  angle_gl
.obj : error LNK2001: unresolved external symbol __imp__glShaderSource@16 [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
  angle_gl
.obj : error LNK2001: unresolved external symbol __imp__glCompileShader@4 [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
  angle_gl
.obj : error LNK2001: unresolved external symbol __imp__glGetShaderiv@12 [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
  angle_gl
.obj : error LNK2001: unresolved external symbol __imp__glGetShaderInfoLog@16 [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
  angle_gl
.obj : error LNK2001: unresolved external symbol __imp__glDeleteShader@4 [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
  angle_gl
.obj : error LNK2001: unresolved external symbol __imp__glCreateProgram@0 [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
  angle_gl
.obj : error LNK2001: unresolved external symbol __imp__glAttachShader@8 [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
  angle_gl
.obj : error LNK2001: unresolved external symbol __imp__glLinkProgram@4 [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
  angle_gl
.obj : error LNK2001: unresolved external symbol __imp__glGetProgramiv@12 [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
  angle_gl
.obj : error LNK2001: unresolved external symbol __imp__glGetProgramInfoLog@16 [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
  C
:\dev\projects\Woolf\out-herschel-uwp\Release\herschel\herschel.exe : fatal error LNK1120: 31 unresolved externals [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]

Thanks

Geoff Lang

unread,
Jan 27, 2020, 11:02:23 AM1/27/20
to nespr...@gmail.com, angleproject
I vaguely remember seeing this before.

Ideas:
 - You may need to link more of the ANGLE libs, libANGLE.lib and others
 - It looks like a name mangling issue.  You may have to define GL_APICALL and GL_APIENTRY like we do in our build.gn files:  https://source.chromium.org/chromium/chromium/src/+/master:third_party/angle/BUILD.gn;l=826  



--
You received this message because you are subscribed to the Google Groups "angleproject" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angleproject...@googlegroups.com.

Nespre t

unread,
Jan 27, 2020, 11:24:25 AM1/27/20
to angleproject


Thanks for your help :-) I tried that and I now get the following errors :

  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\bin\HostX64\x86\link.exe /ERRORREPORT:QUEUE /OUT:"C:\dev\projects\Woolf\out-herschel-uwp\Release\herschel\herschel.exe" /INCREMENTAL:NO /NOLOGO WindowsApp.lib WindowsApp.lib /MANIFEST:NO /DEBUG:FULL /PDB:"C:\dev\projects\Woolf\out-herschel-uwp\Release\herschel\herschel.pdb" /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /LTCG:incremental /TLBID:1 /APPCONTAINER /WINMD:NO /WINMDFILE:"C:\dev\projects\Woolf\out-herschel-uwp\Release\herschel\herschel.winmd" /DYNAMICBASE /NXCOMPAT /MACHINE:X86 /SAFESEH Release\stdafx.obj  Release\herschel_uwp.obj
 
Release\angle_gl.obj
  C
:\dev\libraries\angleproject\out\uwp_win32_release\obj\libGLESv1_CM_static.lib
  C
:\dev\libraries\angleproject\out\uwp_win32_release\obj\libEGL_static.lib
  C
:\dev\libraries\angleproject\out\uwp_win32_release\obj\libGLESv2_static.lib
  C
:\dev\libraries\angleproject\out\uwp_win32_release\obj\angle_common.lib
  C
:\dev\libraries\angleproject\out\uwp_win32_release\obj\angle_gpu_info_util.lib
  C
:\dev\libraries\angleproject\out\uwp_win32_release\obj\angle_image_util.lib
  C
:\dev\libraries\angleproject\out\uwp_win32_release\obj\preprocessor.lib
  C
:\dev\libraries\angleproject\out\uwp_win32_release\obj\translator.lib
vccorlib
.lib(init.obj) : error LNK2038: mismatch detected for 'vccorlib_lib_should_be_specified_before_msvcrt_lib_to_linker': value '1' doesn't match value '0' in MSVCRT.lib(app_appinit.obj) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
vccorlib.lib(init.obj) : error LNK2005: ___crtWinrtInitType already defined in MSVCRT.lib(app_appinit.obj) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
     Creating library C:\dev\projects\Woolf\out-herschel-uwp\Release\herschel\herschel.lib and object C:\dev\projects\Woolf\out-herschel-uwp\Release\herschel\herschel.exp
libGLESv2_static.lib(entry_points_gles_1_0_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::alphaFunc(enum gl::AlphaTestFunc,float)" (?alphaFunc@Context@gl@@QAEXW4AlphaTestFunc@2@M@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_ext_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::alphaFunc(enum gl::AlphaTestFunc,float)" (?alphaFunc@Context@gl@@QAEXW4AlphaTestFunc@2@M@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_1_0_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::alphaFuncx(enum gl::AlphaTestFunc,int)" (?alphaFuncx@Context@gl@@QAEXW4AlphaTestFunc@2@H@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_ext_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::alphaFuncx(enum gl::AlphaTestFunc,int)" (?alphaFuncx@Context@gl@@QAEXW4AlphaTestFunc@2@H@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_1_0_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::clearColorx(int,int,int,int)" (?clearColorx@Context@gl@@QAEXHHHH@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_ext_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::clearColorx(int,int,int,int)" (?clearColorx@Context@gl@@QAEXHHHH@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_1_0_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::clearDepthx(int)" (?clearDepthx@Context@gl@@QAEXH@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_ext_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::clearDepthx(int)" (?clearDepthx@Context@gl@@QAEXH@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_1_0_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::clientActiveTexture(unsigned int)" (?clientActiveTexture@Context@gl@@QAEXI@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_ext_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::clientActiveTexture(unsigned int)" (?clientActiveTexture@Context@gl@@QAEXI@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_1_0_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::clipPlanef(unsigned int,float const *)" (?clipPlanef@Context@gl@@QAEXIPBM@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_ext_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::clipPlanef(unsigned int,float const *)" (?clipPlanef@Context@gl@@QAEXIPBM@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_1_0_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::clipPlanex(unsigned int,int const *)" (?clipPlanex@Context@gl@@QAEXIPBH@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_ext_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::clipPlanex(unsigned int,int const *)" (?clipPlanex@Context@gl@@QAEXIPBH@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_1_0_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::color4f(float,float,float,float)" (?color4f@Context@gl@@QAEXMMMM@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_ext_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::color4f(float,float,float,float)" (?color4f@Context@gl@@QAEXMMMM@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_1_0_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::color4ub(unsigned char,unsigned char,unsigned char,unsigned char)" (?color4ub@Context@gl@@QAEXEEEE@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_ext_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::color4ub(unsigned char,unsigned char,unsigned char,unsigned char)" (?color4ub@Context@gl@@QAEXEEEE@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_1_0_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::color4x(int,int,int,int)" (?color4x@Context@gl@@QAEXHHHH@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_ext_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::color4x(int,int,int,int)" (?color4x@Context@gl@@QAEXHHHH@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_1_0_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::colorPointer(int,enum gl::VertexAttribType,int,void const *)" (?colorPointer@Context@gl@@QAEXHW4VertexAttribType@2@HPBX@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_ext_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::colorPointer(int,enum gl::VertexAttribType,int,void const *)" (?colorPointer@Context@gl@@QAEXHW4VertexAttribType@2@HPBX@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_1_0_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::depthRangex(int,int)" (?depthRangex@Context@gl@@QAEXHH@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_ext_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::depthRangex(int,int)" (?depthRangex@Context@gl@@QAEXHH@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_1_0_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::disableClientState(enum gl::ClientVertexArrayType)" (?disableClientState@Context@gl@@QAEXW4ClientVertexArrayType@2@@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_ext_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::disableClientState(enum gl::ClientVertexArrayType)" (?disableClientState@Context@gl@@QAEXW4ClientVertexArrayType@2@@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_1_0_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::enableClientState(enum gl::ClientVertexArrayType)" (?enableClientState@Context@gl@@QAEXW4ClientVertexArrayType@2@@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_ext_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::enableClientState(enum gl::ClientVertexArrayType)" (?enableClientState@Context@gl@@QAEXW4ClientVertexArrayType@2@@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_1_0_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::fogf(unsigned int,float)" (?fogf@Context@gl@@QAEXIM@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_ext_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::fogf(unsigned int,float)" (?fogf@Context@gl@@QAEXIM@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_1_0_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::fogfv(unsigned int,float const *)" (?fogfv@Context@gl@@QAEXIPBM@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_ext_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::fogfv(unsigned int,float const *)" (?fogfv@Context@gl@@QAEXIPBM@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_1_0_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::fogx(unsigned int,int)" (?fogx@Context@gl@@QAEXIH@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_ext_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::fogx(unsigned int,int)" (?fogx@Context@gl@@QAEXIH@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_1_0_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::fogxv(unsigned int,int const *)" (?fogxv@Context@gl@@QAEXIPBH@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_ext_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::fogxv(unsigned int,int const *)" (?fogxv@Context@gl@@QAEXIPBH@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_1_0_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::frustumf(float,float,float,float,float,float)" (?frustumf@Context@gl@@QAEXMMMMMM@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_ext_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::frustumf(float,float,float,float,float,float)" (?frustumf@Context@gl@@QAEXMMMMMM@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_1_0_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::frustumx(int,int,int,int,int,int)" (?frustumx@Context@gl@@QAEXHHHHHH@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_ext_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::frustumx(int,int,int,int,int,int)" (?frustumx@Context@gl@@QAEXHHHHHH@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_1_0_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::getClipPlanef(unsigned int,float *)" (?getClipPlanef@Context@gl@@QAEXIPAM@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_ext_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::getClipPlanef(unsigned int,float *)" (?getClipPlanef@Context@gl@@QAEXIPAM@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_1_0_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::getClipPlanex(unsigned int,int *)" (?getClipPlanex@Context@gl@@QAEXIPAH@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_ext_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::getClipPlanex(unsigned int,int *)" (?getClipPlanex@Context@gl@@QAEXIPAH@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_1_0_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::getFixedv(unsigned int,int *)" (?getFixedv@Context@gl@@QAEXIPAH@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_ext_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::getFixedv(unsigned int,int *)" (?getFixedv@Context@gl@@QAEXIPAH@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_1_0_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::getLightfv(unsigned int,enum gl::LightParameter,float *)" (?getLightfv@Context@gl@@QAEXIW4LightParameter@2@PAM@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_ext_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::getLightfv(unsigned int,enum gl::LightParameter,float *)" (?getLightfv@Context@gl@@QAEXIW4LightParameter@2@PAM@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_1_0_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::getLightxv(unsigned int,enum gl::LightParameter,int *)" (?getLightxv@Context@gl@@QAEXIW4LightParameter@2@PAH@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_ext_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::getLightxv(unsigned int,enum gl::LightParameter,int *)" (?getLightxv@Context@gl@@QAEXIW4LightParameter@2@PAH@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_1_0_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::getMaterialfv(unsigned int,enum gl::MaterialParameter,float *)" (?getMaterialfv@Context@gl@@QAEXIW4MaterialParameter@2@PAM@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_ext_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::getMaterialfv(unsigned int,enum gl::MaterialParameter,float *)" (?getMaterialfv@Context@gl@@QAEXIW4MaterialParameter@2@PAM@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_1_0_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::getMaterialxv(unsigned int,enum gl::MaterialParameter,int *)" (?getMaterialxv@Context@gl@@QAEXIW4MaterialParameter@2@PAH@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_ext_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::getMaterialxv(unsigned int,enum gl::MaterialParameter,int *)" (?getMaterialxv@Context@gl@@QAEXIW4MaterialParameter@2@PAH@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_1_0_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::getTexEnvfv(enum gl::TextureEnvTarget,enum gl::TextureEnvParameter,float *)" (?getTexEnvfv@Context@gl@@QAEXW4TextureEnvTarget@2@W4TextureEnvParameter@2@PAM@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]      libGLESv2_static.lib(entry_points_gles_ext_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::getTexEnvfv(enum gl::TextureEnvTarget,enum gl::TextureEnvParameter,float *)" (?getTexEnvfv@Context@gl@@QAEXW4TextureEnvTarget@2@W4TextureEnvParameter@2@PAM@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]      libGLESv2_static.lib(entry_points_gles_1_0_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::getTexEnviv(enum gl::TextureEnvTarget,enum gl::TextureEnvParameter,int *)" (?getTexEnviv@Context@gl@@QAEXW4TextureEnvTarget@2@W4TextureEnvParameter@2@PAH@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]        libGLESv2_static.lib(entry_points_gles_ext_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::getTexEnviv(enum gl::TextureEnvTarget,enum gl::TextureEnvParameter,int *)" (?getTexEnviv@Context@gl@@QAEXW4TextureEnvTarget@2@W4TextureEnvParameter@2@PAH@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]        libGLESv2_static.lib(entry_points_gles_1_0_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::getTexEnvxv(enum gl::TextureEnvTarget,enum gl::TextureEnvParameter,int *)" (?getTexEnvxv@Context@gl@@QAEXW4TextureEnvTarget@2@W4TextureEnvParameter@2@PAH@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]        libGLESv2_static.lib(entry_points_gles_ext_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::getTexEnvxv(enum gl::TextureEnvTarget,enum gl::TextureEnvParameter,int *)" (?getTexEnvxv@Context@gl@@QAEXW4TextureEnvTarget@2@W4TextureEnvParameter@2@PAH@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]        libGLESv2_static.lib(entry_points_gles_1_0_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::getTexParameterxv(enum gl::TextureType,unsigned int,int *)" (?getTexParameterxv@Context@gl@@QAEXW4TextureType@2@IPAH@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_ext_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::getTexParameterxv(enum gl::TextureType,unsigned int,int *)" (?getTexParameterxv@Context@gl@@QAEXW4TextureType@2@IPAH@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_1_0_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::lightModelf(unsigned int,float)" (?lightModelf@Context@gl@@QAEXIM@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_ext_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::lightModelf(unsigned int,float)" (?lightModelf@Context@gl@@QAEXIM@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_1_0_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::lightModelfv(unsigned int,float const *)" (?lightModelfv@Context@gl@@QAEXIPBM@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_ext_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::lightModelfv(unsigned int,float const *)" (?lightModelfv@Context@gl@@QAEXIPBM@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_1_0_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::lightModelx(unsigned int,int)" (?lightModelx@Context@gl@@QAEXIH@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_ext_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::lightModelx(unsigned int,int)" (?lightModelx@Context@gl@@QAEXIH@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_1_0_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::lightModelxv(unsigned int,int const *)" (?lightModelxv@Context@gl@@QAEXIPBH@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_ext_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::lightModelxv(unsigned int,int const *)" (?lightModelxv@Context@gl@@QAEXIPBH@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_1_0_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::lightf(unsigned int,enum gl::LightParameter,float)" (?lightf@Context@gl@@QAEXIW4LightParameter@2@M@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static.lib(entry_points_gles_ext_autogen.obj) : error LNK2001: unresolved external symbol "public: void __thiscall gl::Context::lightf(unsigned int,enum gl::LightParameter,float)" (?lightf@Context@gl@@QAEXIW4LightParameter@2@M@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
... and more

Geoff Lang

unread,
Jan 27, 2020, 11:27:52 AM1/27/20
to nespr...@gmail.com, angleproject
Looks like your missing libangle.lib

--
You received this message because you are subscribed to the Google Groups "angleproject" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angleproject...@googlegroups.com.

Nespre t

unread,
Jan 27, 2020, 11:35:24 AM1/27/20
to angleproject
Sorry I should tell you that sooner but I didn't find libANGLE.lib

however there are the following files:

C:\dev\libraries\angleproject\out\uwp_win32_release\obj\libANGLE
C:\dev\libraries\angleproject\out\uwp_win32_release\obj\libANGLE_base
C:\dev\libraries\angleproject\out\uwp_win32_release\obj\libANGLE_headers
C:\dev\libraries\angleproject\out\uwp_win32_release\obj\libANGLE_with_capture
C:\dev\libraries\angleproject\out\uwp_win32_release\obj\libANGLE.ninja
C:\dev\libraries\angleproject\out\uwp_win32_release\obj\libANGLE.stamp
C:\dev\libraries\angleproject\out\uwp_win32_release\obj\libANGLE_base.ninja
C:\dev\libraries\angleproject\out\uwp_win32_release\obj\libANGLE_base.stamp
C:\dev\libraries\angleproject\out\uwp_win32_release\obj\libANGLE_base_cc.pdb
C:\dev\libraries\angleproject\out\uwp_win32_release\obj\libANGLE_cc.pdb
C:\dev\libraries\angleproject\out\uwp_win32_release\obj\libANGLE_headers.ninja
C:\dev\libraries\angleproject\out\uwp_win32_release\obj\libANGLE_headers.stamp
C:\dev\libraries\angleproject\out\uwp_win32_release\obj\libANGLE_headers_cc.pdb
C:\dev\libraries\angleproject\out\uwp_win32_release\obj\libANGLE_with_capture.ninja
C:\dev\libraries\angleproject\out\uwp_win32_release\obj\libANGLE_with_capture.stamp
C:\dev\libraries\angleproject\out\uwp_win32_release\obj\libANGLE_with_capture_cc.pdb
To unsubscribe from this group and stop receiving emails from it, send an email to anglep...@googlegroups.com.

Geoff Lang

unread,
Jan 27, 2020, 3:11:13 PM1/27/20
to nespr...@gmail.com, angleproject
Ah, I see.  libANGLE is a source_set in gn so it may get folded into some other static library.  There must be some .lib in there with these symbols.

To unsubscribe from this group and stop receiving emails from it, send an email to angleproject...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/angleproject/54033f85-a681-4daa-8f00-738bb756c725%40googlegroups.com.

Nespre t

unread,
Jan 27, 2020, 3:28:20 PM1/27/20
to angleproject
I thought that too.

In a powershell prompt, I tried the command « ls -include ('*.lib','*.obj') -r | sls -SimpleMatch 'ANGLEGetDisplayPlatform' | Select -unique path » and I got :

C:\dev\libraries\angleproject\out\uwp_win32_release\obj\libANGLE_base\Platform.obj
C:\dev\libraries\angleproject\out\uwp_win32_release\obj\libGLESv2\proc_table_egl_autogen.obj
C:\dev\libraries\angleproject\out\uwp_win32_release\obj\libGLESv2_capture_complement\proc_table_egl_autogen.obj
C:\dev\libraries\angleproject\out\uwp_win32_release\obj\libGLESv2_static\proc_table_egl_autogen.obj
C:\dev\libraries\angleproject\out\uwp_win32_release\obj\libGLESv2_static.lib
C:\dev\libraries\angleproject\out\uwp_win32_release\libGLESv2.dll.lib
C:\dev\libraries\angleproject\out\uwp_win32_release\libGLESv2_with_capture.dll.lib

But no more

Geoff Lang

unread,
Jan 27, 2020, 3:44:21 PM1/27/20
to nespr...@gmail.com, angleproject
From the log you posted, all the missing functions are ES1 functions.  You could try not linking libGLESv1_CM_static and make sure you're not referencing any of those entry points.  I'm not sure why those specifically would be missing from our context class.

--
You received this message because you are subscribed to the Google Groups "angleproject" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angleproject...@googlegroups.com.

Nespre t

unread,
Jan 27, 2020, 4:06:44 PM1/27/20
to angleproject
I tested what you've recommended.
It doesn't work either.

Currently, I'm using those headers:

//  Enable function definitions in the GL headers below
#  define GL_GLEXT_PROTOTYPES
//  OpenGL ES includes
#  include <GLES2/gl2.h>
#  include <GLES2/gl2ext.h>
//  EGL includes
#  include <EGL/egl.h>
#  include <EGL/eglext.h>
#  include <EGL/eglplatform.h>
//  ANGLE include for Windows Store
#  include <angle_windowsstore.h>

With libGLESv1_CM_static or without doesn't change much.


On Monday, January 27, 2020 at 9:44:21 PM UTC+1, Geoff Lang wrote:
From the log you posted, all the missing functions are ES1 functions.  You could try not linking libGLESv1_CM_static and make sure you're not referencing any of those entry points.  I'm not sure why those specifically would be missing from our context class.

On Mon, Jan 27, 2020 at 3:28 PM Nespre t <nespr...@gmail.com> wrote:
I thought that too.

In a powershell prompt, I tried the command « ls -include ('*.lib','*.obj') -r | sls -SimpleMatch 'ANGLEGetDisplayPlatform' | Select -unique path » and I got :

C:\dev\libraries\angleproject\out\uwp_win32_release\obj\libANGLE_base\Platform.obj
C:\dev\libraries\angleproject\out\uwp_win32_release\obj\libGLESv2\proc_table_egl_autogen.obj
C:\dev\libraries\angleproject\out\uwp_win32_release\obj\libGLESv2_capture_complement\proc_table_egl_autogen.obj
C:\dev\libraries\angleproject\out\uwp_win32_release\obj\libGLESv2_static\proc_table_egl_autogen.obj
C:\dev\libraries\angleproject\out\uwp_win32_release\obj\libGLESv2_static.lib
C:\dev\libraries\angleproject\out\uwp_win32_release\libGLESv2.dll.lib
C:\dev\libraries\angleproject\out\uwp_win32_release\libGLESv2_with_capture.dll.lib

But no more

--
You received this message because you are subscribed to the Google Groups "angleproject" group.
To unsubscribe from this group and stop receiving emails from it, send an email to anglep...@googlegroups.com.

Mark Callow

unread,
Jan 27, 2020, 9:54:32 PM1/27/20
to Geoff Lang, nespr...@gmail.com, angleproject

On Jan 28, 2020, at 1:01, 'Geoff Lang' via angleproject <anglep...@googlegroups.com> wrote:

I vaguely remember seeing this before.

Ideas:
 - You may need to link more of the ANGLE libs, libANGLE.lib and others
 - It looks like a name mangling issue.  You may have to define GL_APICALL and GL_APIENTRY like we do in our build.gn files:  https://source.chromium.org/chromium/chromium/src/+/master:third_party/angle/BUILD.gn;l=826  

Yes. These errors are because the application has been compiled to link with a Windows shared library - the default behavior of the header files. The clue is the __imp__. To build it for linking to a static library you need to define GL_APICALL & GL_APIENTRY appropriately.

Regards

    -Mark

signature.asc

Nespre t

unread,
Jan 28, 2020, 7:18:45 AM1/28/20
to angleproject

Hi, Thanks for your help.

I tried to define GL_APICALL and GL_APIENTRY. But I still get some weird link issues:

...
libGLESv2_static
.lib(entry_points_gles_ext_autogen.obj) : error LNK2019: unresolved external symbol "bool __cdecl gl::ValidateMapBufferOES(class gl::Context *,enum gl::BufferBinding,unsigned int)" (?ValidateMapBufferOES@gl@@YA_NPAVContext@1@W4BufferBinding@1@I@Z) referenced in function "void * __stdcall gl::MapBufferOES(unsigned int,unsigned int)" (?MapBufferOES@gl@@YGPAXII@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static
.lib(entry_points_gles_ext_autogen.obj) : error LNK2019: unresolved external symbol "bool __cdecl gl::ValidateUnmapBufferOES(class gl::Context *,enum gl::BufferBinding)" (?ValidateUnmapBufferOES@gl@@YA_NPAVContext@1@W4BufferBinding@1@@Z) referenced in function "unsigned char __stdcall gl::UnmapBufferOES(unsigned int)" (?UnmapBufferOES@gl@@YGEI@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static
.lib(entry_points_gles_ext_autogen.obj) : error LNK2019: unresolved external symbol "bool __cdecl gl::ValidateCurrentPaletteMatrixOES(class gl::Context *,unsigned int)" (?ValidateCurrentPaletteMatrixOES@gl@@YA_NPAVContext@1@I@Z) referenced in function "void __stdcall gl::CurrentPaletteMatrixOES(unsigned int)" (?CurrentPaletteMatrixOES@gl@@YGXI@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static
.lib(entry_points_gles_ext_autogen.obj) : error LNK2019: unresolved external symbol "bool __cdecl gl::ValidateLoadPaletteFromModelViewMatrixOES(class gl::Context *)" (?ValidateLoadPaletteFromModelViewMatrixOES@gl@@YA_NPAVContext@1@@Z) referenced in function "void __stdcall gl::LoadPaletteFromModelViewMatrixOES(void)" (?LoadPaletteFromModelViewMatrixOES@gl@@YGXXZ) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static
.lib(entry_points_gles_ext_autogen.obj) : error LNK2019: unresolved external symbol "bool __cdecl gl::ValidateMatrixIndexPointerOES(class gl::Context *,int,unsigned int,int,void const *)" (?ValidateMatrixIndexPointerOES@gl@@YA_NPAVContext@1@HIHPBX@Z) referenced in function "void __stdcall gl::MatrixIndexPointerOES(int,unsigned int,int,void const *)" (?MatrixIndexPointerOES@gl@@YGXHIHPBX@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static
.lib(entry_points_gles_ext_autogen.obj) : error LNK2019: unresolved external symbol "bool __cdecl gl::ValidateWeightPointerOES(class gl::Context *,int,unsigned int,int,void const *)" (?ValidateWeightPointerOES@gl@@YA_NPAVContext@1@HIHPBX@Z) referenced in function "void __stdcall gl::WeightPointerOES(int,unsigned int,int,void const *)" (?WeightPointerOES@gl@@YGXHIHPBX@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static
.lib(entry_points_gles_ext_autogen.obj) : error LNK2019: unresolved external symbol "bool __cdecl gl::ValidatePointSizePointerOES(class gl::Context *,enum gl::VertexAttribType,int,void const *)" (?ValidatePointSizePointerOES@gl@@YA_NPAVContext@1@W4VertexAttribType@1@HPBX@Z) referenced in function "void __stdcall gl::PointSizePointerOES(unsigned int,int,void const *)" (?PointSizePointerOES@gl@@YGXIHPBX@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static
.lib(entry_points_gles_ext_autogen.obj) : error LNK2019: unresolved external symbol "bool __cdecl gl::ValidateQueryMatrixxOES(class gl::Context *,int *,int *)" (?ValidateQueryMatrixxOES@gl@@YA_NPAVContext@1@PAH1@Z) referenced in function "unsigned int __stdcall gl::QueryMatrixxOES(int *,int *)" (?QueryMatrixxOES@gl@@YGIPAH0@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static
.lib(entry_points_gles_ext_autogen.obj) : error LNK2019: unresolved external symbol "bool __cdecl gl::ValidateCompressedTexImage3DOES(class gl::Context *,enum gl::TextureTarget,int,unsigned int,int,int,int,int,int,void const *)" (?ValidateCompressedTexImage3DOES@gl@@YA_NPAVContext@1@W4TextureTarget@1@HIHHHHHPBX@Z) referenced in function "void __stdcall gl::CompressedTexImage3DOES(unsigned int,int,unsigned int,int,int,int,int,int,void const *)" (?CompressedTexImage3DOES@gl@@YGXIHIHHHHHPBX@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static
.lib(entry_points_gles_ext_autogen.obj) : error LNK2019: unresolved external symbol "bool __cdecl gl::ValidateCompressedTexSubImage3DOES(class gl::Context *,enum gl::TextureTarget,int,int,int,int,int,int,int,unsigned int,int,void const *)" (?ValidateCompressedTexSubImage3DOES@gl@@YA_NPAVContext@1@W4TextureTarget@1@HHHHHHHIHPBX@Z) referenced in function "void __stdcall gl::CompressedTexSubImage3DOES(unsigned int,int,int,int,int,int,int,int,unsigned int,int,void const *)" (?CompressedTexSubImage3DOES@gl@@YGXIHHHHHHHIHPBX@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static
.lib(entry_points_gles_ext_autogen.obj) : error LNK2019: unresolved external symbol "bool __cdecl gl::ValidateCopyTexSubImage3DOES(class gl::Context *,enum gl::TextureTarget,int,int,int,int,int,int,int,int)" (?ValidateCopyTexSubImage3DOES@gl@@YA_NPAVContext@1@W4TextureTarget@1@HHHHHHHH@Z) referenced in function "void __stdcall gl::CopyTexSubImage3DOES(unsigned int,int,int,int,int,int,int,int,int)" (?CopyTexSubImage3DOES@gl@@YGXIHHHHHHHH@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
libGLESv2_static
.lib(entry_points_gles_ext_autogen.obj) : error LNK2019: unresolved external symbol "bool __cdecl gl::ValidateFramebufferTexture3DOES(class gl::Context *,unsigned int,unsigned int,enum gl::TextureTarget,struct gl::TextureID,int,int)" (?ValidateFramebufferTexture3DOES@gl@@YA_NPAVContext@1@IIW4TextureTarget@1@UTextureID@1@HH@Z) referenced in function "void __stdcall gl::FramebufferTexture3DOES(unsigned int,unsigned int,unsigned int,unsigned int,int,int)" (?FramebufferTexture3DOES@gl@@YGXIIIIHH@Z) [C:\dev\projects\Woolf\out-herschel-uwp\herschel.vcxproj]
... *and more



Nespre t

unread,
Jan 29, 2020, 5:33:44 PM1/29/20
to angleproject
After some digging, I encounter an issue that could be related to the UWP build.
The static libraries must be built with -ZW in order to be UWP «compliant».
Is there a way to check that somewhere in the GN files ?

Nespre t

unread,
Jan 29, 2020, 7:54:04 PM1/29/20
to angleproject
In my case, trying to work with cppwinrt and ANGLE as static library in the same time is probably the issue.


Matt Esch

unread,
Apr 16, 2020, 8:07:33 AM4/16/20
to angleproject
After spending some time working on this there is clearly an issue with the generated ninja files for libGLESv2_static.ninja but I'm not exactly sure how to fix this in the related BUILD.gn

If you make a comparison between the libGLESv2.ninja and libGLESv2_static.ninja you can see that the missing files (and related linker errors) come from the fact that the object files from libANGLE_base are missing and there is no supplementary library that should be included. You would however expect libGLESv2 and libGLESv2_static to be equivalent.

I was able to manually edit the libGLESv2_static.ninja to include the missing files and static compilation worked, as long as the required libraries were included and the aforementioned definitions were set.


How I generated the solution:

gn gen -v out/Release --sln=angle-release --ide=vs2019 --args="target_cpu=\"x86\" is_clang=false is_debug=false angle_enable_metal=false angle_enable_swiftshader=false angle_enable_vulkan=false"

Note that I had some issues with a badly generated solution that included the linker option "/llvmlibthin" which is not compatible with the msvc linker (I used is_clang=false to guard against this).


From libGLESv2_static.lib (notice that there is hardly anything included):

build obj/libGLESv2_static.lib: alink obj/libGLESv2_static/entry_points_egl.obj obj/libGLESv2_static/entry_points_egl_ext.obj obj/libGLESv2_static/entry_points_gles_1_0_autogen.obj obj/libGLESv2_static/entry_points_gles_2_0_autogen.obj obj/libGLESv2_static/entry_points_gles_3_0_autogen.obj obj/libGLESv2_static/entry_points_gles_3_1_autogen.obj obj/libGLESv2_static/entry_points_gles_3_2_autogen.obj obj/libGLESv2_static/entry_points_gles_ext_autogen.obj obj/libGLESv2_static/global_state.obj obj/libGLESv2_static/libGLESv2.res obj/libGLESv2_static/libGLESv2_autogen.obj obj/libGLESv2_static/proc_table_egl_autogen.obj || obj/angle_version.stamp obj/libANGLE.stamp obj/includes.stamp obj/libANGLE_base.stamp obj/angle_common.lib obj/angle_system_utils.stamp obj/xxhash.stamp obj/angle_gpu_info_util.lib obj/libANGLE_headers.stamp obj/angle_translator_headers.stamp obj/translator.lib obj/preprocessor.lib obj/angle_image_util.lib obj/angle_image_util_headers.stamp
  arflags
= /ignore$:4221
  output_extension
= .lib
  output_dir
= obj


From libGLESv2.ninja:

build ./libGLESv2.dll ./libGLESv2.dll.lib ./libGLESv2.dll.pdb: solink obj/libGLESv2/entry_points_egl.obj obj/libGLESv2/entry_points_egl_ext.obj obj/libGLESv2/entry_points_gles_1_0_autogen.obj obj/libGLESv2/entry_points_gles_2_0_autogen.obj obj/libGLESv2/entry_points_gles_3_0_autogen.obj obj/libGLESv2/entry_points_gles_3_1_autogen.obj obj/libGLESv2/entry_points_gles_3_2_autogen.obj obj/libGLESv2/entry_points_gles_ext_autogen.obj obj/libGLESv2/global_state.obj obj/libGLESv2/libGLESv2.res obj/libGLESv2/libGLESv2_autogen.obj obj/libGLESv2/proc_table_egl_autogen.obj obj/libANGLE/FrameCapture_mock.obj obj/libANGLE_base/AttributeMap.obj obj/libANGLE_base/BlobCache.obj obj/libANGLE_base/Buffer.obj obj/libANGLE_base/Caps.obj obj/libANGLE_base/Compiler.obj obj/libANGLE_base/Config.obj obj/libANGLE_base/Context.obj obj/libANGLE_base/Context_gl.obj obj/libANGLE_base/Context_gles_1_0.obj obj/libANGLE_base/Debug.obj obj/libANGLE_base/Device.obj obj/libANGLE_base/Display.obj obj/libANGLE_base/EGLSync.obj obj/libANGLE_base/Error.obj obj/libANGLE_base/Fence.obj obj/libANGLE_base/Framebuffer.obj obj/libANGLE_base/FramebufferAttachment.obj obj/libANGLE_base/GLES1Renderer.obj obj/libANGLE_base/GLES1State.obj obj/libANGLE_base/HandleAllocator.obj obj/libANGLE_base/Image.obj obj/libANGLE_base/ImageIndex.obj obj/libANGLE_base/IndexRangeCache.obj obj/libANGLE_base/LoggingAnnotator.obj obj/libANGLE_base/MemoryObject.obj obj/libANGLE_base/MemoryProgramCache.obj obj/libANGLE_base/Observer.obj obj/libANGLE_base/Platform.obj obj/libANGLE_base/Program.obj obj/libANGLE_base/ProgramExecutable.obj obj/libANGLE_base/ProgramLinkedResources.obj obj/libANGLE_base/ProgramPipeline.obj obj/libANGLE_base/Query.obj obj/libANGLE_base/Renderbuffer.obj obj/libANGLE_base/ResourceManager.obj obj/libANGLE_base/Sampler.obj obj/libANGLE_base/Semaphore.obj obj/libANGLE_base/Shader.obj obj/libANGLE_base/State.obj obj/libANGLE_base/Stream.obj obj/libANGLE_base/Surface.obj obj/libANGLE_base/Texture.obj obj/libANGLE_base/Thread.obj obj/libANGLE_base/TransformFeedback.obj obj/libANGLE_base/Uniform.obj obj/libANGLE_base/VaryingPacking.obj obj/libANGLE_base/VertexArray.obj obj/libANGLE_base/VertexAttribute.obj obj/libANGLE_base/WorkerThread.obj obj/libANGLE_base/angletypes.obj obj/libANGLE_base/entry_points_enum_autogen.obj obj/libANGLE_base/es3_copy_conversion_table_autogen.obj obj/libANGLE_base/format_map_autogen.obj obj/libANGLE_base/format_map_desktop.obj obj/libANGLE_base/formatutils.obj obj/libANGLE_base/queryconversions.obj obj/libANGLE_base/queryutils.obj obj/libANGLE_base/ContextImpl.obj obj/libANGLE_base/DeviceImpl.obj obj/libANGLE_base/DisplayImpl.obj obj/libANGLE_base/Format_table_autogen.obj obj/libANGLE_base/ProgramPipelineImpl.obj obj/libANGLE_base/QueryImpl.obj obj/libANGLE_base/ShaderImpl.obj obj/libANGLE_base/SurfaceImpl.obj obj/libANGLE_base/TextureImpl.obj obj/libANGLE_base/driver_utils.obj obj/libANGLE_base/load_functions_table_autogen.obj obj/libANGLE_base/renderer_utils.obj obj/libANGLE_base/validationEGL.obj obj/libANGLE_base/validationES.obj obj/libANGLE_base/validationES1.obj obj/libANGLE_base/validationES2.obj obj/libANGLE_base/validationES3.obj obj/libANGLE_base/validationES31.obj obj/libANGLE_base/validationES32.obj obj/libANGLE_base/validationESEXT.obj obj/libANGLE_base/validationGL1.obj obj/libANGLE_base/validationGL11.obj obj/libANGLE_base/validationGL12.obj obj/libANGLE_base/validationGL13.obj obj/libANGLE_base/validationGL14.obj obj/libANGLE_base/validationGL15.obj obj/libANGLE_base/validationGL2.obj obj/libANGLE_base/validationGL21.obj obj/libANGLE_base/validationGL3.obj obj/libANGLE_base/validationGL31.obj obj/libANGLE_base/validationGL32.obj obj/libANGLE_base/validationGL33.obj obj/libANGLE_base/validationGL4.obj obj/libANGLE_base/validationGL41.obj obj/libANGLE_base/validationGL42.obj obj/libANGLE_base/validationGL43.obj obj/libANGLE_base/validationGL44.obj obj/libANGLE_base/validationGL45.obj obj/libANGLE_base/validationGL46.obj obj/libANGLE_base/BufferD3D.obj obj/libANGLE_base/CompilerD3D.obj obj/libANGLE_base/DeviceD3D.obj obj/libANGLE_base/DisplayD3D.obj obj/libANGLE_base/DynamicHLSL.obj obj/libANGLE_base/DynamicImage2DHLSL.obj obj/libANGLE_base/EGLImageD3D.obj obj/libANGLE_base/FramebufferD3D.obj obj/libANGLE_base/HLSLCompiler.obj obj/libANGLE_base/ImageD3D.obj obj/libANGLE_base/IndexBuffer.obj obj/libANGLE_base/IndexDataManager.obj obj/libANGLE_base/NativeWindowD3D.obj obj/libANGLE_base/ProgramD3D.obj obj/libANGLE_base/RenderTargetD3D.obj obj/libANGLE_base/RenderbufferD3D.obj obj/libANGLE_base/RendererD3D.obj obj/libANGLE_base/ShaderD3D.obj obj/libANGLE_base/ShaderExecutableD3D.obj obj/libANGLE_base/SurfaceD3D.obj obj/libANGLE_base/SwapChainD3D.obj obj/libANGLE_base/TextureD3D.obj obj/libANGLE_base/VertexBuffer.obj obj/libANGLE_base/VertexDataManager.obj obj/libANGLE_base/Blit9.obj obj/libANGLE_base/Buffer9.obj obj/libANGLE_base/Context9.obj obj/libANGLE_base/DebugAnnotator9.obj obj/libANGLE_base/Fence9.obj obj/libANGLE_base/Framebuffer9.obj obj/libANGLE_base/Image9.obj obj/libANGLE_base/IndexBuffer9.obj obj/libANGLE_base/NativeWindow9.obj obj/libANGLE_base/Query9.obj obj/libANGLE_base/RenderTarget9.obj obj/libANGLE_base/Renderer9.obj obj/libANGLE_base/ShaderExecutable9.obj obj/libANGLE_base/StateManager9.obj obj/libANGLE_base/SwapChain9.obj obj/libANGLE_base/TextureStorage9.obj obj/libANGLE_base/VertexBuffer9.obj obj/libANGLE_base/VertexDeclarationCache.obj obj/libANGLE_base/formatutils9.obj obj/libANGLE_base/renderer9_utils.obj obj/libANGLE_base/Blit11.obj obj/libANGLE_base/Buffer11.obj obj/libANGLE_base/Clear11.obj obj/libANGLE_base/Context11.obj obj/libANGLE_base/DebugAnnotator11.obj obj/libANGLE_base/ExternalImageSiblingImpl11.obj obj/libANGLE_base/Fence11.obj obj/libANGLE_base/Framebuffer11.obj obj/libANGLE_base/Image11.obj obj/libANGLE_base/IndexBuffer11.obj obj/libANGLE_base/InputLayoutCache.obj obj/libANGLE_base/MappedSubresourceVerifier11.obj obj/libANGLE_base/PixelTransfer11.obj obj/libANGLE_base/Program11.obj obj/libANGLE_base/ProgramPipeline11.obj obj/libANGLE_base/Query11.obj obj/libANGLE_base/RenderStateCache.obj obj/libANGLE_base/RenderTarget11.obj obj/libANGLE_base/Renderer11.obj obj/libANGLE_base/ResourceManager11.obj obj/libANGLE_base/ShaderExecutable11.obj obj/libANGLE_base/StateManager11.obj obj/libANGLE_base/StreamProducerD3DTexture.obj obj/libANGLE_base/SwapChain11.obj obj/libANGLE_base/TextureStorage11.obj obj/libANGLE_base/TransformFeedback11.obj obj/libANGLE_base/Trim11.obj obj/libANGLE_base/VertexArray11.obj obj/libANGLE_base/VertexBuffer11.obj obj/libANGLE_base/dxgi_format_map_autogen.obj obj/libANGLE_base/dxgi_support_table_autogen.obj obj/libANGLE_base/formatutils11.obj obj/libANGLE_base/renderer11_utils.obj obj/libANGLE_base/texture_format_table.obj obj/libANGLE_base/texture_format_table_autogen.obj obj/libANGLE_base/CompositorNativeWindow11.obj obj/libANGLE_base/NativeWindow11Win32.obj obj/libANGLE_base/SystemInfo.obj obj/libANGLE_base/BlitGL.obj obj/libANGLE_base/BufferGL.obj obj/libANGLE_base/ClearMultiviewGL.obj obj/libANGLE_base/CompilerGL.obj obj/libANGLE_base/ContextGL.obj obj/libANGLE_base/DispatchTableGL_autogen.obj obj/libANGLE_base/DisplayGL.obj obj/libANGLE_base/FenceNVGL.obj obj/libANGLE_base/FramebufferGL.obj obj/libANGLE_base/FunctionsGL.obj obj/libANGLE_base/ImageGL.obj obj/libANGLE_base/MemoryObjectGL.obj obj/libANGLE_base/ProgramGL.obj obj/libANGLE_base/ProgramPipelineGL.obj obj/libANGLE_base/QueryGL.obj obj/libANGLE_base/RenderbufferGL.obj obj/libANGLE_base/RendererGL.obj obj/libANGLE_base/SamplerGL.obj obj/libANGLE_base/SemaphoreGL.obj obj/libANGLE_base/ShaderGL.obj obj/libANGLE_base/StateManagerGL.obj obj/libANGLE_base/SurfaceGL.obj obj/libANGLE_base/SyncGL.obj obj/libANGLE_base/TextureGL.obj obj/libANGLE_base/TransformFeedbackGL.obj obj/libANGLE_base/VertexArrayGL.obj obj/libANGLE_base/formatutilsgl.obj obj/libANGLE_base/renderergl_utils.obj obj/libANGLE_base/null_functions.obj obj/libANGLE_base/ContextWGL.obj obj/libANGLE_base/D3DTextureSurfaceWGL.obj obj/libANGLE_base/DXGISwapChainWindowSurfaceWGL.obj obj/libANGLE_base/DisplayWGL.obj obj/libANGLE_base/FunctionsWGL.obj obj/libANGLE_base/PbufferSurfaceWGL.obj obj/libANGLE_base/RendererWGL.obj obj/libANGLE_base/WindowSurfaceWGL.obj obj/libANGLE_base/wgl_utils.obj obj/libANGLE_base/BufferNULL.obj obj/libANGLE_base/CompilerNULL.obj obj/libANGLE_base/ContextNULL.obj obj/libANGLE_base/DeviceNULL.obj obj/libANGLE_base/DisplayNULL.obj obj/libANGLE_base/FenceNVNULL.obj obj/libANGLE_base/FramebufferNULL.obj obj/libANGLE_base/ImageNULL.obj obj/libANGLE_base/ProgramNULL.obj obj/libANGLE_base/ProgramPipelineNULL.obj obj/libANGLE_base/QueryNULL.obj obj/libANGLE_base/RenderbufferNULL.obj obj/libANGLE_base/SamplerNULL.obj obj/libANGLE_base/ShaderNULL.obj obj/libANGLE_base/SurfaceNULL.obj obj/libANGLE_base/SyncNULL.obj obj/libANGLE_base/TextureNULL.obj obj/libANGLE_base/TransformFeedbackNULL.obj obj/libANGLE_base/VertexArrayNULL.obj obj/angle_system_utils/system_utils.obj obj/angle_system_utils/system_utils_win.obj obj/angle_system_utils/system_utils_win32.obj obj/xxhash/xxhash.obj obj/libANGLE_headers/Overlay.obj obj/libANGLE_headers/OverlayWidgets.obj obj/libANGLE_headers/Overlay_autogen.obj obj/libANGLE_headers/Overlay_font_autogen.obj obj/angle_common.lib obj/angle_gpu_info_util.lib obj/translator.lib obj/preprocessor.lib obj/angle_image_util.lib | ../../src/libGLESv2/libGLESv2_autogen.def || obj/angle_version.stamp obj/libANGLE.stamp obj/includes.stamp obj/build/config/shared_library_deps.stamp obj/libANGLE_base.stamp obj/angle_system_utils.stamp obj/xxhash.stamp obj/libANGLE_headers.stamp obj/angle_translator_headers.stamp obj/angle_image_util_headers.stamp
  ldflags
= /OPT$:REF /OPT$:ICF /INCREMENTAL$:NO /FIXED$:NO /PROFILE /WX /OPT$:ICF /DEBUG /pdbaltpath$:%_PDB% /MACHINE$:X86 /SAFESEH /largeaddressaware /FIXED$:NO /ignore$:4199 /ignore$:4221 /NXCOMPAT /DYNAMICBASE /INCREMENTAL$:NO /SUBSYSTEM$:CONSOLE,5.01 /DELAYLOAD$:d3d9.dll /LIBPATH:"C$:/Program$ Files$ (x86)/Windows$ Kits/10/lib/10.0.18362.0/um/x86" /LIBPATH:"C$:/Program$ Files$ (x86)/Microsoft$ Visual$ Studio/2019/Community/VC/Tools/MSVC/14.25.28610/lib/x86" /LIBPATH:"C$:/Program$ Files$ (x86)/Microsoft$ Visual$ Studio/2019/Community/VC/Tools/MSVC/14.25.28610/ATLMFC/lib/x86" /DEF:../../src/libGLESv2/libGLESv2_autogen.def
  libs
= advapi32.lib comdlg32.lib dbghelp.lib dnsapi.lib gdi32.lib msimg32.lib odbc32.lib odbccp32.lib oleaut32.lib shell32.lib shlwapi.lib user32.lib usp10.lib uuid.lib version.lib wininet.lib winmm.lib winspool.lib ws2_32.lib delayimp.lib kernel32.lib ole32.lib d3d9.lib dxguid.lib setupapi.lib dxgi.lib
  frameworks
=
  output_extension
= .dll
  output_dir
= .


Definitions I needed to set in my own code before includes:

#define ANGLE_EXPORT
#define ANGLE_UTIL_EXPORT
#define EGLAPI
#define GL_API
#define GL_APICALL


Compulsory libs I had to link in my use case (as the static library does not link the libs). You can also borrow the ldflags and libs from libGLESv2.ninja when building you own project because this is a bit more sophisticated (delay load d3d9.lib etc)

#pragma comment (lib, "user32.lib")
#pragma comment (lib, "d3d9.lib")
#pragma comment (lib, "gdi32.lib")
#pragma comment (lib, "dxgi.lib")
#pragma comment (lib, "dxguid.lib")


The modified libGLESv2_static.ninja that actually works:

defines = -DUSE_AURA=1 -D_HAS_EXCEPTIONS=0 -D__STD_C -D_CRT_RAND_S -D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE -D_ATL_NO_OPENGL -D_WINDOWS -DCERT_CHAIN_PARA_HAS_EXTRA_FIELDS -DPSAPI_VERSION=2 -DWIN32 -D_SECURE_ATL -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP -DWIN32_LEAN_AND_MEAN -DNOMINMAX -D_UNICODE -DUNICODE -DNTDDI_VERSION=NTDDI_WIN10_RS2 -D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DANGLE_IS_32_BIT_CPU -DANGLE_EXPORT= -DANGLE_UTIL_EXPORT= -DEGLAPI= -DGL_APICALL= -DGL_API= -DANGLE_CAPTURE_ENABLED=0 -DLIBANGLE_IMPLEMENTATION -DANGLE_ENABLE_D3D9 -DANGLE_ENABLE_D3D11 -DANGLE_ENABLE_OPENGL -DANGLE_ENABLE_OPENGL_NULL -DANGLE_ENABLE_NULL
include_dirs = -I../../include -I../../src -Igen/angle -I../../src/common/third_party/base -I../../include -I../../include -I../../src -I../../include
cflags = /Gy /FS /bigobj /utf-8 /Zc$:sizedDealloc- /wd4117 /D__DATE__= /D__TIME__= /D__TIMESTAMP__= /W4 /WX /wd4091 /wd4127 /wd4251 /wd4275 /wd4312 /wd4324 /wd4351 /wd4355 /wd4503 /wd4589 /wd4611 /wd4100 /wd4121 /wd4244 /wd4505 /wd4510 /wd4512 /wd4610 /wd4838 /wd4995 /wd4996 /wd4456 /wd4457 /wd4458 /wd4459 /wd4200 /wd4201 /wd4204 /wd4221 /wd4245 /wd4267 /wd4305 /wd4389 /wd4702 /wd4701 /wd4703 /wd4661 /wd4706 /wd4715 /wd4267 /O1 /Ob2 /Oy- /Zc$:inline /Gw /Oi /Zi /MT /we4244 /we4456 /we4458 /we4715 /we4800 /we4838 /wd4530
cflags_cc = /TP /wd4577 /GR-
label_name = libGLESv2_static
target_out_dir = obj
target_output_name = libGLESv2_static

build obj/libGLESv2_static/entry_points_egl.obj: cxx ../../src/libGLESv2/entry_points_egl.cpp || obj/commit_id.stamp
build obj/libGLESv2_static/entry_points_egl_ext.obj: cxx ../../src/libGLESv2/entry_points_egl_ext.cpp || obj/commit_id.stamp
build obj/libGLESv2_static/entry_points_gles_1_0_autogen.obj: cxx ../../src/libGLESv2/entry_points_gles_1_0_autogen.cpp || obj/commit_id.stamp
build obj/libGLESv2_static/entry_points_gles_2_0_autogen.obj: cxx ../../src/libGLESv2/entry_points_gles_2_0_autogen.cpp || obj/commit_id.stamp
build obj/libGLESv2_static/entry_points_gles_3_0_autogen.obj: cxx ../../src/libGLESv2/entry_points_gles_3_0_autogen.cpp || obj/commit_id.stamp
build obj/libGLESv2_static/entry_points_gles_3_1_autogen.obj: cxx ../../src/libGLESv2/entry_points_gles_3_1_autogen.cpp || obj/commit_id.stamp
build obj/libGLESv2_static/entry_points_gles_3_2_autogen.obj: cxx ../../src/libGLESv2/entry_points_gles_3_2_autogen.cpp || obj/commit_id.stamp
build obj/libGLESv2_static/entry_points_gles_ext_autogen.obj: cxx ../../src/libGLESv2/entry_points_gles_ext_autogen.cpp || obj/commit_id.stamp
build obj/libGLESv2_static/global_state.obj: cxx ../../src/libGLESv2/global_state.cpp || obj/commit_id.stamp
build obj/libGLESv2_static/libGLESv2.res: rc ../../src/libGLESv2/libGLESv2.rc || obj/commit_id.stamp
build obj/libGLESv2_static/libGLESv2_autogen.obj: cxx ../../src/libGLESv2/libGLESv2_autogen.cpp || obj/commit_id.stamp
build obj/libGLESv2_static/proc_table_egl_autogen.obj: cxx ../../src/libGLESv2/proc_table_egl_autogen.cpp || obj/commit_id.stamp

build obj/libGLESv2_static.lib: alink obj/libGLESv2/entry_points_egl.obj obj/libGLESv2/entry_points_egl_ext.obj obj/libGLESv2/entry_points_gles_1_0_autogen.obj obj/libGLESv2/entry_points_gles_2_0_autogen.obj obj/libGLESv2/entry_points_gles_3_0_autogen.obj obj/libGLESv2/entry_points_gles_3_1_autogen.obj obj/libGLESv2/entry_points_gles_3_2_autogen.obj obj/libGLESv2/entry_points_gles_ext_autogen.obj obj/libGLESv2/global_state.obj obj/libGLESv2/libGLESv2.res obj/libGLESv2/libGLESv2_autogen.obj obj/libGLESv2/proc_table_egl_autogen.obj obj/libANGLE/FrameCapture_mock.obj obj/libANGLE_base/AttributeMap.obj obj/libANGLE_base/BlobCache.obj obj/libANGLE_base/Buffer.obj obj/libANGLE_base/Caps.obj obj/libANGLE_base/Compiler.obj obj/libANGLE_base/Config.obj obj/libANGLE_base/Context.obj obj/libANGLE_base/Context_gl.obj obj/libANGLE_base/Context_gles_1_0.obj obj/libANGLE_base/Debug.obj obj/libANGLE_base/Device.obj obj/libANGLE_base/Display.obj obj/libANGLE_base/EGLSync.obj obj/libANGLE_base/Error.obj obj/libANGLE_base/Fence.obj obj/libANGLE_base/Framebuffer.obj obj/libANGLE_base/FramebufferAttachment.obj obj/libANGLE_base/GLES1Renderer.obj obj/libANGLE_base/GLES1State.obj obj/libANGLE_base/HandleAllocator.obj obj/libANGLE_base/Image.obj obj/libANGLE_base/ImageIndex.obj obj/libANGLE_base/IndexRangeCache.obj obj/libANGLE_base/LoggingAnnotator.obj obj/libANGLE_base/MemoryObject.obj obj/libANGLE_base/MemoryProgramCache.obj obj/libANGLE_base/Observer.obj obj/libANGLE_base/Platform.obj obj/libANGLE_base/Program.obj obj/libANGLE_base/ProgramExecutable.obj obj/libANGLE_base/ProgramLinkedResources.obj obj/libANGLE_base/ProgramPipeline.obj obj/libANGLE_base/Query.obj obj/libANGLE_base/Renderbuffer.obj obj/libANGLE_base/ResourceManager.obj obj/libANGLE_base/Sampler.obj obj/libANGLE_base/Semaphore.obj obj/libANGLE_base/Shader.obj obj/libANGLE_base/State.obj obj/libANGLE_base/Stream.obj obj/libANGLE_base/Surface.obj obj/libANGLE_base/Texture.obj obj/libANGLE_base/Thread.obj obj/libANGLE_base/TransformFeedback.obj obj/libANGLE_base/Uniform.obj obj/libANGLE_base/VaryingPacking.obj obj/libANGLE_base/VertexArray.obj obj/libANGLE_base/VertexAttribute.obj obj/libANGLE_base/WorkerThread.obj obj/libANGLE_base/angletypes.obj obj/libANGLE_base/entry_points_enum_autogen.obj obj/libANGLE_base/es3_copy_conversion_table_autogen.obj obj/libANGLE_base/format_map_autogen.obj obj/libANGLE_base/format_map_desktop.obj obj/libANGLE_base/formatutils.obj obj/libANGLE_base/queryconversions.obj obj/libANGLE_base/queryutils.obj obj/libANGLE_base/ContextImpl.obj obj/libANGLE_base/DeviceImpl.obj obj/libANGLE_base/DisplayImpl.obj obj/libANGLE_base/Format_table_autogen.obj obj/libANGLE_base/ProgramPipelineImpl.obj obj/libANGLE_base/QueryImpl.obj obj/libANGLE_base/ShaderImpl.obj obj/libANGLE_base/SurfaceImpl.obj obj/libANGLE_base/TextureImpl.obj obj/libANGLE_base/driver_utils.obj obj/libANGLE_base/load_functions_table_autogen.obj obj/libANGLE_base/renderer_utils.obj obj/libANGLE_base/validationEGL.obj obj/libANGLE_base/validationES.obj obj/libANGLE_base/validationES1.obj obj/libANGLE_base/validationES2.obj obj/libANGLE_base/validationES3.obj obj/libANGLE_base/validationES31.obj obj/libANGLE_base/validationES32.obj obj/libANGLE_base/validationESEXT.obj obj/libANGLE_base/validationGL1.obj obj/libANGLE_base/validationGL11.obj obj/libANGLE_base/validationGL12.obj obj/libANGLE_base/validationGL13.obj obj/libANGLE_base/validationGL14.obj obj/libANGLE_base/validationGL15.obj obj/libANGLE_base/validationGL2.obj obj/libANGLE_base/validationGL21.obj obj/libANGLE_base/validationGL3.obj obj/libANGLE_base/validationGL31.obj obj/libANGLE_base/validationGL32.obj obj/libANGLE_base/validationGL33.obj obj/libANGLE_base/validationGL4.obj obj/libANGLE_base/validationGL41.obj obj/libANGLE_base/validationGL42.obj obj/libANGLE_base/validationGL43.obj obj/libANGLE_base/validationGL44.obj obj/libANGLE_base/validationGL45.obj obj/libANGLE_base/validationGL46.obj obj/libANGLE_base/BufferD3D.obj obj/libANGLE_base/CompilerD3D.obj obj/libANGLE_base/DeviceD3D.obj obj/libANGLE_base/DisplayD3D.obj obj/libANGLE_base/DynamicHLSL.obj obj/libANGLE_base/DynamicImage2DHLSL.obj obj/libANGLE_base/EGLImageD3D.obj obj/libANGLE_base/FramebufferD3D.obj obj/libANGLE_base/HLSLCompiler.obj obj/libANGLE_base/ImageD3D.obj obj/libANGLE_base/IndexBuffer.obj obj/libANGLE_base/IndexDataManager.obj obj/libANGLE_base/NativeWindowD3D.obj obj/libANGLE_base/ProgramD3D.obj obj/libANGLE_base/RenderTargetD3D.obj obj/libANGLE_base/RenderbufferD3D.obj obj/libANGLE_base/RendererD3D.obj obj/libANGLE_base/ShaderD3D.obj obj/libANGLE_base/ShaderExecutableD3D.obj obj/libANGLE_base/SurfaceD3D.obj obj/libANGLE_base/SwapChainD3D.obj obj/libANGLE_base/TextureD3D.obj obj/libANGLE_base/VertexBuffer.obj obj/libANGLE_base/VertexDataManager.obj obj/libANGLE_base/Blit9.obj obj/libANGLE_base/Buffer9.obj obj/libANGLE_base/Context9.obj obj/libANGLE_base/DebugAnnotator9.obj obj/libANGLE_base/Fence9.obj obj/libANGLE_base/Framebuffer9.obj obj/libANGLE_base/Image9.obj obj/libANGLE_base/IndexBuffer9.obj obj/libANGLE_base/NativeWindow9.obj obj/libANGLE_base/Query9.obj obj/libANGLE_base/RenderTarget9.obj obj/libANGLE_base/Renderer9.obj obj/libANGLE_base/ShaderExecutable9.obj obj/libANGLE_base/StateManager9.obj obj/libANGLE_base/SwapChain9.obj obj/libANGLE_base/TextureStorage9.obj obj/libANGLE_base/VertexBuffer9.obj obj/libANGLE_base/VertexDeclarationCache.obj obj/libANGLE_base/formatutils9.obj obj/libANGLE_base/renderer9_utils.obj obj/libANGLE_base/Blit11.obj obj/libANGLE_base/Buffer11.obj obj/libANGLE_base/Clear11.obj obj/libANGLE_base/Context11.obj obj/libANGLE_base/DebugAnnotator11.obj obj/libANGLE_base/ExternalImageSiblingImpl11.obj obj/libANGLE_base/Fence11.obj obj/libANGLE_base/Framebuffer11.obj obj/libANGLE_base/Image11.obj obj/libANGLE_base/IndexBuffer11.obj obj/libANGLE_base/InputLayoutCache.obj obj/libANGLE_base/MappedSubresourceVerifier11.obj obj/libANGLE_base/PixelTransfer11.obj obj/libANGLE_base/Program11.obj obj/libANGLE_base/ProgramPipeline11.obj obj/libANGLE_base/Query11.obj obj/libANGLE_base/RenderStateCache.obj obj/libANGLE_base/RenderTarget11.obj obj/libANGLE_base/Renderer11.obj obj/libANGLE_base/ResourceManager11.obj obj/libANGLE_base/ShaderExecutable11.obj obj/libANGLE_base/StateManager11.obj obj/libANGLE_base/StreamProducerD3DTexture.obj obj/libANGLE_base/SwapChain11.obj obj/libANGLE_base/TextureStorage11.obj obj/libANGLE_base/TransformFeedback11.obj obj/libANGLE_base/Trim11.obj obj/libANGLE_base/VertexArray11.obj obj/libANGLE_base/VertexBuffer11.obj obj/libANGLE_base/dxgi_format_map_autogen.obj obj/libANGLE_base/dxgi_support_table_autogen.obj obj/libANGLE_base/formatutils11.obj obj/libANGLE_base/renderer11_utils.obj obj/libANGLE_base/texture_format_table.obj obj/libANGLE_base/texture_format_table_autogen.obj obj/libANGLE_base/CompositorNativeWindow11.obj obj/libANGLE_base/NativeWindow11Win32.obj obj/libANGLE_base/SystemInfo.obj obj/libANGLE_base/BlitGL.obj obj/libANGLE_base/BufferGL.obj obj/libANGLE_base/ClearMultiviewGL.obj obj/libANGLE_base/CompilerGL.obj obj/libANGLE_base/ContextGL.obj obj/libANGLE_base/DispatchTableGL_autogen.obj obj/libANGLE_base/DisplayGL.obj obj/libANGLE_base/FenceNVGL.obj obj/libANGLE_base/FramebufferGL.obj obj/libANGLE_base/FunctionsGL.obj obj/libANGLE_base/ImageGL.obj obj/libANGLE_base/MemoryObjectGL.obj obj/libANGLE_base/ProgramGL.obj obj/libANGLE_base/ProgramPipelineGL.obj obj/libANGLE_base/QueryGL.obj obj/libANGLE_base/RenderbufferGL.obj obj/libANGLE_base/RendererGL.obj obj/libANGLE_base/SamplerGL.obj obj/libANGLE_base/SemaphoreGL.obj obj/libANGLE_base/ShaderGL.obj obj/libANGLE_base/StateManagerGL.obj obj/libANGLE_base/SurfaceGL.obj obj/libANGLE_base/SyncGL.obj obj/libANGLE_base/TextureGL.obj obj/libANGLE_base/TransformFeedbackGL.obj obj/libANGLE_base/VertexArrayGL.obj obj/libANGLE_base/formatutilsgl.obj obj/libANGLE_base/renderergl_utils.obj obj/libANGLE_base/null_functions.obj obj/libANGLE_base/ContextWGL.obj obj/libANGLE_base/D3DTextureSurfaceWGL.obj obj/libANGLE_base/DXGISwapChainWindowSurfaceWGL.obj obj/libANGLE_base/DisplayWGL.obj obj/libANGLE_base/FunctionsWGL.obj obj/libANGLE_base/PbufferSurfaceWGL.obj obj/libANGLE_base/RendererWGL.obj obj/libANGLE_base/WindowSurfaceWGL.obj obj/libANGLE_base/wgl_utils.obj obj/libANGLE_base/BufferNULL.obj obj/libANGLE_base/CompilerNULL.obj obj/libANGLE_base/ContextNULL.obj obj/libANGLE_base/DeviceNULL.obj obj/libANGLE_base/DisplayNULL.obj obj/libANGLE_base/FenceNVNULL.obj obj/libANGLE_base/FramebufferNULL.obj obj/libANGLE_base/ImageNULL.obj obj/libANGLE_base/ProgramNULL.obj obj/libANGLE_base/ProgramPipelineNULL.obj obj/libANGLE_base/QueryNULL.obj obj/libANGLE_base/RenderbufferNULL.obj obj/libANGLE_base/SamplerNULL.obj obj/libANGLE_base/ShaderNULL.obj obj/libANGLE_base/SurfaceNULL.obj obj/libANGLE_base/SyncNULL.obj obj/libANGLE_base/TextureNULL.obj obj/libANGLE_base/TransformFeedbackNULL.obj obj/libANGLE_base/VertexArrayNULL.obj obj/angle_system_utils/system_utils.obj obj/angle_system_utils/system_utils_win.obj obj/angle_system_utils/system_utils_win32.obj obj/xxhash/xxhash.obj obj/libANGLE_headers/Overlay.obj obj/libANGLE_headers/OverlayWidgets.obj obj/libANGLE_headers/Overlay_autogen.obj obj/libANGLE_headers/Overlay_font_autogen.obj obj/angle_common.lib obj/angle_gpu_info_util.lib obj/translator.lib obj/preprocessor.lib obj/angle_image_util.lib | ../../src/libGLESv2/libGLESv2_autogen.def || obj/angle_version.stamp obj/libANGLE.stamp obj/includes.stamp obj/build/config/shared_library_deps.stamp obj/libANGLE_base.stamp obj/angle_system_utils.stamp obj/xxhash.stamp obj/libANGLE_headers.stamp obj/angle_translator_headers.stamp obj/angle_image_util_headers.stamp
  arflags = /ignore$:4221
  output_extension = .lib
  output_dir = obj


On Wednesday, 9 December 2015 14:01:44 UTC, Tibor den Ouden wrote:
If I change 'angle_gl_library_type%' to 'static_library'
in angle.gyp (line 21) and run glient runhooks,
I can build static libs for libEGL and libGLESv2

Only when I start linking them to an application (hello_triangle for instance)
I get unresolved symbols.
This is due to the exported functions still containing the dll interface calling conventions.
By changing the following lines in : angle/include/export.h :
#if defined(_WIN32)
#   if defined(LIBGLESV2_IMPLEMENTATION) || defined(LIBANGLE_IMPLEMENTATION)
#       define ANGLE_EXPORT __declspec(dllexport)
#   else
#       define ANGLE_EXPORT __declspec(dllimport)
#   endif
#elif defined(__GNUC__)
to :
#if defined(_WIN32)
#   if defined(LIBGLESV2_IMPLEMENTATION) || defined(LIBANGLE_IMPLEMENTATION)
#       define ANGLE_EXPORT 
#   else
#       define ANGLE_EXPORT 
#   endif
#elif defined(__GNUC__)

And in : angle/include/KHR/khrplatform.h :
#if defined(_WIN32) && !defined(__SCITECH_SNAP__)
#   define KHRONOS_APICALL __declspec(dllimport)
#elif defined (__SYMBIAN32__)
to :
#if defined(_WIN32) && !defined(__SCITECH_SNAP__)
#   define KHRONOS_APICALL 
#elif defined (__SYMBIAN32__)
that is solved.

For applications for which the project files are not generated from .gyp files
you have to add d3d9.lib to the Linker Input as Additional Dependencies for release builds.
For debug builds you have to add d3d9.lib and dxguid.lib.

Is there a 'default' way to change the dll interface calling conventions for static libs ?

Otherwise, if building libEGL and libGLESv2 as static libraries on Windows is still supported,
I can provide a changelist to fix the calling conventions for ANGLE_EXPORT and KHRONOS_APICALL.
I think a new preprocessor define is needed :
ANGLE_STATIC_LIBS, ANGLE_BUILD_STATIC_LIBS ?

Matt Esch

unread,
Apr 17, 2020, 8:18:46 PM4/17/20
to angleproject
After even more digging, I made this edit to BUILD.gn

diff --git a/BUILD.gn b/BUILD.gn
index ee9bd397a..11c28a384 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -900,7 +900,14 @@ angle_static_library("libGLESv2_static") {
   configs += [ ":debug_annotations_config" ]
   public_configs += [ ":angle_static" ]
   deps = [ ":includes" ]
-  public_deps = [ ":libANGLE" ]
+  public_deps = [
+    ":libANGLE",
+    ":angle_common",
+    ":angle_gpu_info_util",
+    ":angle_version",
+    ":libANGLE_headers",
+    ":translator"
+  ]
 }

 angle_shared_library("libGLESv1_CM") {

My understanding is that public deps are propagated to shared libraries and not static objects, so the public_deps from libAngle need to be included manually.

Jamie Madill

unread,
Apr 20, 2020, 10:17:01 AM4/20/20
to ma...@mattesch.info, angleproject
Matt, static link requires that you manually link every dependent static library of libGLESv2 into your target. Not just libGLESv2_static, everything that libGLESv2 depends on. I suspect that's what is tripping you up.

--
You received this message because you are subscribed to the Google Groups "angleproject" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angleproject...@googlegroups.com.

Precious Hills

unread,
May 3, 2020, 9:48:31 AM5/3/20
to angleproject

Nespre t

unread,
Jun 4, 2020, 11:18:40 AM6/4/20
to angleproject
Matt Esch, thanks for your help, however your patch in BUILD.gn didn't help for me.
Did you manage to get a static build working on microsoft windows ?

Matt Esch

unread,
Jun 4, 2020, 11:52:33 AM6/4/20
to nespr...@gmail.com, angleproject
I think my editing must not have worked as I expected, it's hard to keep track with manual edits. The technically correct answer has already been provided to building on windows - you do need to compile and statically link all the different components, however they don't all have static targets, I modified the target manually to get compiled static binaries, someone needs to figure out how to add static libraries for the missing components.

I have an example of the x86 binary:  https://github.com/Matt-Esch/unigl/tree/master/bin/windows/x86  


On Thu, Jun 4, 2020 at 4:18 PM Nespre t <nespr...@gmail.com> wrote:
Matt Esch, thanks for your help, however your patch in BUILD.gn didn't help for me.
Did you manage to get a static build working on microsoft windows ?

--
You received this message because you are subscribed to the Google Groups "angleproject" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angleproject...@googlegroups.com.

Jean Valjean

unread,
Dec 15, 2020, 7:49:36 AM12/15/20
to angleproject
Is there a way to get this working nowadays ?
I get a corrupted static lib file when I try to compile libGLESv2_static or libEGL_static
No problem so far on the dll version

Jean Valjean

unread,
Dec 16, 2020, 2:53:11 AM12/16/20
to angleproject
So finally, the solutions lies in the « angle_white_box_tests » source code
Fine for me, I will dig into that direction.

Have a nice day.

Edward _Abramian

unread,
Dec 24, 2020, 1:44:41 PM12/24/20
to angleproject
I tried to follow the discussion but failed to understand if this problem has a solution or in the process of being addressed. Can anyone elaborate on the status of this issue? I'd really appreciate it.

Thank you,
Edward

Mick Pearson

unread,
Jun 2, 2021, 9:59:21 AM6/2/21
to angleproject
It seems this is still an issue one Windows. The logical solution since these static.lib files are in the obj folder, there should be another one in there with the bulk of the ANGLE internals that are missing. From what's been said here it seems like a libangle_static.lib should be amongst them at a minimum. The GN project could just build it alongside the dll.lib one.

[I've been trying to understand the structure of the project without anything to go on and this seemed like the case, but I thought maybe it was mixing shared and static (i.e. the static.lib files served some technial purpose) because zlib.dll.lib is linked into the static.lib files, so I just actually built something and then I began understand what this thread was about.]

Mick Pearson

unread,
Jun 9, 2021, 6:00:45 AM6/9/21
to angleproject
Sorry, is anybody home at angleproject? Left to my own devices I noticed a "is_component_build = false" args.gn argument that can put GN into static library mode. This gets a lot closer, however the libANGLE_base.ninja file that seems to include many of the missing functionality doesn't seem to output a LIB file. Instead it seems to just make "stamp" files as its target. Being unfamiliar with GN I'm out of my depth, but I don't have much choice but to carry on. I think that probably the build files need amendment. I've attached the libANGLE_base.ninja output because it takes a bit of work to build ANGLE in this mode. P.S. I hope one of the project members will open up to us on the outside soon, -Michael.

libANGLE_base.ninja.zip

Mick Pearson

unread,
Jun 11, 2021, 2:15:07 PM6/11/21
to angleproject
To try to end this thread... I've posted here (https://groups.google.com/g/angleproject/c/f7i0kucc5xM/m/ANzo95TmBwAJ) very clean/easy code for adding the missing static target to the root BUILD.gn file. Hopefully something like this will get added to ANGLE before too long so you don't have to hack it!!
Reply all
Reply to author
Forward
0 new messages