glbinding icon indicating copy to clipboard operation
glbinding copied to clipboard

Problem with glBufferData under MinGW GCC 9.2

Open Darky-Lucera opened this issue 5 years ago • 2 comments

( 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?

Darky-Lucera avatar Mar 17 '20 20:03 Darky-Lucera

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.

scheibel avatar Mar 21 '20 13:03 scheibel

I cloned the current master

Darky-Lucera avatar Mar 23 '20 08:03 Darky-Lucera