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

Václav Zeman vhaisman@gmail.com
Wed Apr 3 16:11:00 GMT 2013


On 04/03/2013 04:11 PM, Corinna Vinschen wrote:
> On Apr  3 14:28, Václav Zeman wrote:
>> On 3 April 2013 13:59, Corinna Vinschen wrote:
>>> On Apr  3 13:36, Corinna Vinschen wrote:
>>>> On Apr  3 13:25, Václav Zeman wrote:
>>>>> On 2 April 2013 17:37, Corinna Vinschen wrote:
>>>>>> 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?
>> I am using C++ but I am not using the VarCmp() function at all. I am
>> only including the windows.h header.
>>
>>>
>>> I just tried it myself and I can link against VarCmp just fine...
>>> *If* I add a -loleaut32 to the linker stage.
>> I think this is my fault. I am using '-fkeep-inline-functions' GCC
>> flag for my debug builds. I have not tested but I believe it will work
>> when I remove the option. I have solved it in the library by linking
>> to oleaut32.lib.
> 
> Erm... oleaut32.lib?  You didn't link against the Microsoft link lib,
> did you?  That should have been -loleaut32 or /usr/lib/w32api/liboleaut32.a
Right. What I have actually done is that I have added
AC_HAVE_LIBRARY([oleaut32]) to my configure.ac.

> 
>> It is odd that I have never experienced the same issue on 32 bit Cygwin.
> 
> Even when using the newer w32api headers from mingw-w64?  Maybe there's
> a difference in terms of gcc versions...

-- 
VZ


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 293 bytes
Desc: OpenPGP digital signature
URL: <http://cygwin.com/pipermail/cygwin-developers/attachments/20130403/021f3952/attachment.sig>


More information about the Cygwin-developers mailing list