|
Hi,
I have compiled libmusclecard under Linux (CentOS), but when I try to compile a simple program of test (a part of muscletest.c) I've found some problems... (In order to compile the library with ./configure, make, make install, I've commented out the main of muscletest.c because of errors during the linking, as undefined reference to 'MSCListTokens', etc...) the program is very simple:
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "PCSC/musclecard.h" #include "strlcpycat.h" #define MY_OBJECT_ID "c1" #define MY_OBJECT_SIZE 50 static MSCUShort16 getUShort16(MSCPUChar8 srcValue) { return (MSCUShort16)( ((srcValue[0]) << 8) | srcValue[1] ); } static MSCULong32 getULong32(MSCPUChar8 srcValue) { MSCULong32 temp; temp = srcValue[0] * 0x1000000; temp += srcValue[1] * 0x10000; temp += srcValue[2] * 0x100; temp += srcValue[3]; return temp; } int main(int argc, char **argv) { MSCLong32 rv; MSCTokenConnection pConnection; MSCObjectACL objACL; MSCObjectInfo objInfo; MSCUChar8 pRandomData[20]; MSCUChar8 pSeed[8]; MSCUChar8 defaultPIN[16]; MSCUChar8 AID[] = { 0xA0, 0x00, 0x00, 0x00, 0x01, 0x01 }; MSCUChar8 myData[] = "MUSCLE VIRTUAL CARD."; MSCUChar8 readData[50]; MSCLPTokenInfo tokenList; MSCULong32 tokenSize; MSCUChar8 temp[8]; MSCULong32 dummy; int reader_to_use; MSCULong32 i, j; printf("********************************************************\n"); printf("\n"); tokenList = NULL; tokenSize = 0; rv = MSCListTokens(MSC_LIST_SLOTS, tokenList, &tokenSize); if (rv != MSC_SUCCESS) { printf("MSCListTokens returns : %s\n", msc_error(rv)); return -1; } return 0;
}
The error I've found is:
/tmp/ccaSmOdN.o (.text+0x10b): In function
'main':
: undefined reference to
'MSCListTokens'
collect2: ld returned 1 exit status
Can you help me to solve this problem?
Laura
|
_______________________________________________ Muscle mailing list [email protected] http://lists.drizzle.com/mailman/listinfo/muscle
