32-bit Windows builds have wrong function signature
26 views
Skip to first unread message
Benjamin Young
unread,
Apr 27, 2023, 2:14:23 PM4/27/23
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to angleproject
I stumbled on this trying to build an SDL2/GLES2 app with Angle on Windows, utilizing the MINGW32 flavor of MSYS2.
When linking, I always got these undefined reference errors:
C:/msys64/mingw32/bin/sdl2gles2tri.c:(.text+0x83): undefined reference to `_imp__glShaderSource@16'
C:/msys64/mingw32/bin/sdl2gles2tri.c:(.text+0x93): undefined reference to `_imp__glCompileShader@4'
C:/msys64/mingw32/bin/sdl2gles2tri.c:(.text+0xb2): undefined reference to `_imp__glGetShaderiv@12' etc.
The Khronos headers use a different calling convention on _WIN32, as seen here:
/*------------------------------------------------------------------------- * Definition of KHRONOS_APIENTRY *------------------------------------------------------------------------- * This follows the return type of the function and precedes the function * name in the function prototype.*/
#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(KHRONOS_STATIC)
/* Win32 but not WinCE */
# defineKHRONOS_APIENTRY __stdcall
#else
# defineKHRONOS_APIENTRY
#endif
If I remove that preprocessor condition, everything links fine. It seems like Angle should be mangling the abi to match on 32-bit windows builds.
However, I can't seem to find 32-bit windows builds for Angle, so maybe this is just a known and not-supported thing.
-- Ben
Benjamin Young
unread,
Apr 27, 2023, 2:15:38 PM4/27/23
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message