This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

linking with winscard.dll


Hi,

I'm trying to link (from within cygwin environment) an application 
against winscard.dll, but I keep getting error messages from the linker.

I tried to link against winscard.lib provided with MS VC++, but I get

   undefined reference to `SCardEstablishContext@16'

and similar errors.

I also tried to create a '.a' library as explained in your guide, using 
dlltool, but the result is the same.

I see that objdump shows identifiers with __cdecl calling conventions 
from winscard.lib

   [  5](sec  3)(fl 0x00)(ty   0)(scl   2) (nx 0) 0x00000000 
_SCardEstablishContext

but I see WINAPI declarations in the winscard.h, that corresponds to 
__stdcall conventions (hence the
@16 suffix searched for by the linker). (I also tried to replace WINAPI 
with __cdecl in winscard.h
and it linked, but in the end didn't work very well, I guess because I 
was calling those functions
with the bad conventions...)

I'm not an expert of objdump and especially of mixed Unix/Windows 
compiling/linking.

Do you have any help/suggestions for me ?

Thank you, bye,

   Tommaso Cucinotta.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]