This is the mail archive of the
cygwin-developers
mailing list for the Cygwin project.
Re: [64 bit] problem using Win32 API in native Cygwin64 library
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin-developers at cygwin dot com
- Date: Wed, 3 Apr 2013 13:36:25 +0200
- Subject: Re: [64 bit] problem using Win32 API in native Cygwin64 library
- References: <CAKw7uVgA__HaEWya9o93oV0u-YaYhRmSEUBbJOMgvifk5DLZZw at mail dot gmail dot com> <20130402111942 dot GC15384 at calimero dot vinschen dot de> <20130402153705 dot GE18060 at calimero dot vinschen dot de> <CAKw7uVgBKofxyyYJeFGWUpLD-FigNy_u1VBx06ayrS4U=-AoGA at mail dot gmail dot com>
- Reply-to: cygwin-developers at cygwin dot com
On Apr 3 13:25, VÃclav Zeman wrote:
> On 2 April 2013 17:37, Corinna Vinschen wrote:
> > On Apr 2 13:19, Corinna Vinschen wrote:
> >> 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.
> >
> > I just uploaded a new w32api package which should fix this issue.
> > The intrinsics are now provide by libkernel32.a. Please give it
> > a try.
> It is much better but I am still getting one failure:
>
> 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'
> collect2: error: ld returned 1 exit status
> Makefile:1110: recipe for target `liblog4cplus.la' failed
Are you using C++? If so, can you try to use the other variant
of VarCmp, with an extra, forth parameter, set to 0?
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat