public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: i686 ld couldn't resolve wglCreateContext from libopengl32.a on x86_64 system
@ 2017-03-03  0:14 sorryforaskingthis.bk.ru via cygwin
  2017-03-03  1:19 ` Yaakov Selkowitz
  2017-03-03 13:50 ` Andrey Repin
  0 siblings, 2 replies; 6+ messages in thread
From: sorryforaskingthis.bk.ru via cygwin @ 2017-03-03  0:14 UTC (permalink / raw)
  To: cygwin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=utf-8, Size: 1199 bytes --]

>On 2017-03-02 16:54, Yaakov Selkowitz <yselkowitz@cygwin.com> wrote:
>
>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?
>
Yes, you're right. It's autoconf test and it perfectly passed at 64-bit MinGW and 64-bit Cygwin, but not on 32-bit Cygwin.
And I don't understand why you're say that it is related to stdcall, while wglCreateContext exposed directly without any @0 @4 etc. With --enable-stdcall-fixup ld says: undefined reference to `wglCreateContext@0'

Yes, I need to use Win32.
I want to port application that heavily POSIX-dependent, but also want to save performance as much as possible.

I think if w32api-runtime package is provided it supposed to work.\x03B‹KCB”\x1c›Ø›\x19[H\x1c™\^[ܝ\x1cΈ\b\b\b\b\b\b\x1a\x1d\x1d\x1c\x0e‹ËØÞYÝÚ[‹˜ÛÛKÜ\x1c›Ø›\x19[\Ëš\x1d^[[\x03B‘TNˆ\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\x1a\x1d\x1d\x1c\x0e‹ËØÞYÝÚ[‹˜ÛÛKÙ˜\KÃB‘^[ØÝ[Y[\x18]\x1a[ÛŽˆ\b\b\b\b\b\b\b\b\x1a\x1d\x1d\x1c\x0e‹ËØÞYÝÚ[‹˜ÛÛKÙ^[ØÜËš\x1d^[[\x03B•[œÝXœØÜšX™H\x1a[™›Îˆ\b\b\b\b\b\x1a\x1d\x1d\x1c\x0e‹ËØÞYÝÚ[‹˜ÛÛKÛ[\vÈÝ[œÝXœØÜšX™K\Ú[\^[\x19CBƒB

^ permalink raw reply	[flat|nested] 6+ messages in thread
* i686 ld couldn't resolve wglCreateContext from libopengl32.a on x86_64 system
@ 2017-03-02 22:17 sorryforaskingthis.bk.ru via cygwin
  2017-03-02 22:54 ` Yaakov Selkowitz
  0 siblings, 1 reply; 6+ messages in thread
From: sorryforaskingthis.bk.ru via cygwin @ 2017-03-02 22:17 UTC (permalink / raw)
  To: cygwin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=utf-8, Size: 772 bytes --]

I've done fresh install of cygwin with setup-x86.exe @ Win10 LTSB 2015 x64.

I've installed gcc-core and w32api-runtime packages.

opengl32.dll in System32 folder is 32-bit dll

With x86_64 install of cygwin ld able to find reference to wglCreateContext, with x86 - not.

$ 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;
}\0ТÒÐÐ¥\a&ö&ÆVÒ\a&W\x06÷'G3¢\x02\x02\x02\x02\x02\x02\x06‡GG\x03¢òö7–wv–âæ6öÒ÷\a&ö&ÆV×2æ‡FÖÀФd\x15\x13¢\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x06‡GG\x03¢òö7–wv–âæ6öÒöf\x17\x12ðФFö7VÖVçF\x17F–öã¢\x02\x02\x02\x02\x02\x02\x02\x02\x06‡GG\x03¢òö7–wv–âæ6öÒöFö72æ‡FÖÀÐ¥Vç7V'67&–&R\x06–æfó¢\x02\x02\x02\x02\x02\x06‡GG\x03¢òö7–wv–âæ6öÒöÖÂò7Vç7V'67&–&R×6–×\x06ÆPРÐ

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-03-03 13:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-03  0:14 i686 ld couldn't resolve wglCreateContext from libopengl32.a on x86_64 system sorryforaskingthis.bk.ru via cygwin
2017-03-03  1:19 ` Yaakov Selkowitz
2017-03-03  1:57   ` Michael Enright
2017-03-03 13:50 ` Andrey Repin
  -- strict thread matches above, loose matches on Subject: below --
2017-03-02 22:17 sorryforaskingthis.bk.ru via cygwin
2017-03-02 22:54 ` Yaakov Selkowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).