Problem with glBufferData under MinGW GCC 9.2
( using CMake 3.16.4, MinGW Makefiles, MinGW 64 GCC 9.2, Windows 10 )
Compiling cubescape example I'm getting this link error:
glbinding/source/examples/cubescape/CubeScape.cpp:172: undefined reference to `gl::glBufferData(gl::GLenum, unsigned long long, void const*, gl::GLenum)'
Curiously it works if I change glBufferData by glBufferDataARB
It seems that both methods are in libglbinding.dll.a:
objconv -dH libglbinding.dll.a | grep -i glbufferdata
ZN2gl15glBufferDataARBENS_6GLenumExPKvS0
_imp__ZN2gl15glBufferDataARBENS_6GLenumExPKvS0
ZN2gl12glBufferDataENS_6GLenumExPKvS0
_imp__ZN2gl12glBufferDataENS_6GLenumExPKvS0
Looking at the code, both methods are quite similar to me.
I'm puzzled. Some clues about what is going on?
Which version of glbinding are you using? The current master? The latest release 3.1.0?
What I can confirm for the current master:
- the parameter signatures for both functions are identical (after resolving typedefs)
- both functions are declared in functions.h
- both functions are defined in functions_b.cpp Concluding, I see no indication that a compiler may treat those two functions differently.
Maybe I setup the MinGW as you described and test it for myself.
I cloned the current master