* 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.\x03BKCB\x1cØ\x19[H\x1c\^[Ü\x1cÎ\b\b\b\b\b\b\x1a\x1d\x1d\x1c\x0eËØÞYÝÚ[ÛÛKÜ\x1cØ\x19[\Ë\x1d^[[\x03BTN\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ØÜXH\x1a[Î\b\b\b\b\b\x1a\x1d\x1d\x1c\x0eËØÞYÝÚ[ÛÛKÛ[\vÈÝ[ÝXØÜXK\Ú[\^[\x19CBB
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: i686 ld couldn't resolve wglCreateContext from libopengl32.a on x86_64 system
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
1 sibling, 1 reply; 6+ messages in thread
From: Yaakov Selkowitz @ 2017-03-03 1:19 UTC (permalink / raw)
To: cygwin
On 2017-03-02 18:14, sorryforaskingthis.bk.ru via cygwin wrote:
>> 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.
It would fail on 32-bit MinGW too.
> And I don't understand why you're say that it is related to stdcall, while
> wglCreateContext exposed directly without any @0 @4 etc.
No, it's not, check the implib yourself. You have to use a proper
declaration to link stdcall functions, and the autoconf tests don't do
that. You need to change the test to avoid this; exactly how depends on
the intent of the test.
> 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.
Big difference.
> I think if w32api-runtime package is provided it supposed to work.
Maybe, maybe not. Mixing *NIX and Win32 APIs isn't so simple.
--
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: i686 ld couldn't resolve wglCreateContext from libopengl32.a on x86_64 system
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 13:50 ` Andrey Repin
1 sibling, 0 replies; 6+ messages in thread
From: Andrey Repin @ 2017-03-03 13:50 UTC (permalink / raw)
To: sorryforaskingthis.bk.ru via cygwin, cygwin
Greetings, sorryforaskingthis.bk.ru via cygwin!
> Yes, I need to use Win32.
> also want to save performance as much as possible.
Choose one or another.
In my experience, 32-bit apps perform worse on 64-bit host than native apps.
--
With best regards,
Andrey Repin
Friday, March 3, 2017 16:45:20
Sorry for my terrible english...
--
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
^ 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\x06GG\x03¢òö7wvâæ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\x06GG\x03¢òö7wvâæ6öÒöf\x17\x12ðФFö7VÖVçF\x17Föã¢\x02\x02\x02\x02\x02\x02\x02\x02\x06GG\x03¢òö7wvâæ6öÒöFö72æFÖÀÐ¥Vç7V'67&&R\x06æfó¢\x02\x02\x02\x02\x02\x06GG\x03¢òö7wvâæ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).