delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/10/30/14:30:15

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <3BDEFF98.6010201@sssup.it>
Date: Tue, 30 Oct 2001 20:29:28 +0100
From: Tommaso Cucinotta <cucinotta AT sssup DOT it>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; it-IT; m18) Gecko/20010131
Netscape6/6.01
X-Accept-Language: it
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: 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 AT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019