This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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'

conftest.c:

#ifdef __cplusplus
extern "C"
#endif
char wglCreateContext ();
int
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?

--
Yaakov

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]