Web lists-archives.com

Re: i686 ld couldn't resolve wglCreateContext from libopengl32.a on x86_64 system

On 2017-03-02 16:17, sorryforaskingthis.bk.ru via cygwin wrote:
$ gcc -o /tmp/conftest.exe /tmp/conftest.c -lopengl32
/tmp/ccec30zH.o:conftest.c:(.text+0xc): undefined reference to `wglCreateContext'


#ifdef __cplusplus
extern "C"
char wglCreateContext ();
main ()
return wglCreateContext ();
  return 0;

This looks like a snippet of an autoconf AC_CHECK_LIB (or AC_CHECK_FUNCTION) test. Such tests don't work with 32-bit Win32 APIs -- on either Cygwin or MinGW -- because they don't take stdcall into account. You'll need to modify the test to work around that.

Also, if you're using Cygwin, do you *really* want to be using Win32 OpenGL and not X11?


Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple