[64 bit] problem using Win32 API in native Cygwin64 library

Corinna Vinschen corinna-cygwin@cygwin.com
Tue Apr 2 11:19:00 GMT 2013


Hi Václav,

On Apr  2 12:25, Václav Zeman wrote:
> Hi.
> 
> I have tried to compile the log4cplus library on Cygwin64. Compilation
> goes fine but linking ends with error.
> [...]
> src/.libs/liblog4cplus_la-cygwin-win32.o: In function `VarCmp':
> /usr/include/w32api/oleauto.h:487: undefined reference to `VarCmp'
> /usr/include/w32api/oleauto.h:487:(.text+0x34f): relocation truncated
> to fit: R_X86_64_PC32 against undefined symbol `VarCmp'
> src/.libs/liblog4cplus_la-cygwin-win32.o: In function `_InterlockedAdd':
> /usr/include/w32api/winnt.h:1452: undefined reference to
> `_InterlockedExchangeAdd'
> [...]

Thanks for the report.  That's apparently a bug in the Cygwin w32api
implementation of the mingw libs.  On 64 bit, a lot of simple functions
of the w32api, or functions used under the hood of inline functions, are
implemented as compiler intrinsics in the Microsoft Visual compilers.

These compiler intrinsics don't exist in gcc, therefore they are
implemented as library functions in Mingw-w64.  Unfortunately they are
implemented in libmingwex.a right now, which is not included in the
Cygwin w32api.

I'm going to fix that today, so that the intrinsics will be exported
by libkernel32.a instead.  This allows Cygwin applications to access
them as well.

Stay tuned.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat



More information about the Cygwin-developers mailing list