unresolved external symbol (trying to use C_SetPin function)
hi
i'm writing a program to utilize the C_Setpin() function from the dkck201.dll library (iKey2000 usb token). I want to write a simple console program which can change the token's pin.
Here's my source code (I just modified it from the Secpin.cpp example taken from the sample201 folder.
#include "stdafx.h" #include "test.h" #include "dkcryp32.h" #include "SPinDlgs.h" #include "typemap.h" #include <iostream.h> int main(){ cout<<"Test here"; } void OnCommonChangePin() cout<<"Change PIN - Unprotected Authentication"; strcpy(oldPin, cmnCP.m_oldPin); C_Logout(NULL); RV = C_Login(NULL, CKU_USER, (unsignedchar *)oldPin, (CK_USHORT)oldPinLen); RV = C_SetPIN(NULL, (unsignedchar *)oldPin, (CK_USHORT)oldPinLen, (unsignedchar *)newPin, (CK_USHORT)newPinLen); cout<<"The Change Pass Phrase failed."; cout<<"Change Pass Phrase successful"; |
It compiled successfully, but when I try to run it, the following message appears:
========================================================
Linking...
imin.obj : error LNK2001: unresolved external symbol "public: __thiscall CmnCP::CmnCP(class CWnd *,class CString)" (?0CmnCP@@QAE@PAVCWnd@@VCString@@@Z)
Debug/imin.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
imin.exe - 2 error(s), 0 warning(s)
========================================================
I have set my Project Settings>Link>General>Object library modules: C:\SafeNet\iKey2000\Kit\LIB\dkck201.lib
to link to the lib file, added the path to C:\SafeNet\iKey2000\Kit\H\201 in the additional include directories, but the problem still persist.
I hope anyone here can help me. Any help is greatly appreciated. Thanks.

