OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Anton Soudovtsev (soudovtsev_at_BLUEWIN.CH)
Date: Sun Jan 12 2003 - 04:12:26 CST

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    In C++ and in C you have to specify the location of function declaration
    you use (it's the headers files) and the location of the function
    implementation (it's the library files).
    If you look at the SCardEstablishContext function help, you will see
    these two things.
    The library to link against is : winscard.lib. The libraries are set in
    your project properties.

    Anton.

    -----Message d'origine-----
    De : SmartCardSDK [mailto:SmartCardSDKDISCUSS.MICROSOFT.COM] De la part
    de prince vijay daniel
    Envoyé : samedi, 11. janvier 2003 15:42
    À : SmartCardSDKDISCUSS.MICROSOFT.COM
    Objet : vc++ smart card doupt

    hello members ,
          when i try to build the following Vc++ code, in windows 2000
    server(SP3), visual studio 6.0

    #include <tchar.h>
    #include <stdio.h>
    #include <windows.h>
    #include <winscard.h>

    void main (){

     SCARDCONTEXT hSC;
        LONG lReturn;
         // Establish the context.
        lReturn = SCardEstablishContext(SCARD_SCOPE_USER,
                                    NULL,
                                    NULL,
                                    &hSC);

    }

        I am getting the link error as follows
     
    --------------------Configuration: scard - Win32
    Debug-------------------- Linking... Main.obj : error LNK2001:
    unresolved external symbol _SCardEstablishContext16 Debug/scard.exe :
    fatal error LNK1120: 1 unresolved externals Error executing link.exe.
     
    scard.exe - 2 error(s), 0 warning(s)
     

    kindly reply the solution as soon as possible.

    NOTE: The Options--> Directories are set as follows

        Include paths are
      1.. C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE
      2.. C:\Program Files\Microsoft Visual Studio\VC98\MFC\INCLUDE
      3.. C:\Program Files\Microsoft Visual Studio\VC98\ATL\INCLUDE
      Library paths are
      1.. C:\Program Files\Microsoft Visual Studio\VC98\LIB
      2.. C:\Program Files\Microsoft Visual Studio\VC98\MFC\LIB
       

    Prince vijay daniel k

    Consultant

    manned s.r.l.

    www.manned.com

    ------------------------------------------------------------------------
    --------

                             "We bring life to computing"