Hi,
I am a new to the makefile world. I am trying to write a makefile
which consists of two files,but at the compilation time it is giving me
linking error. I do have a feeling that it is makefile error.
/******Makefile***********/
LOCAL_OBJS=DecryptApi.o TESTDRV.o
TESTDRV: $(LOCAL_OBJS)
arm-linux-gcc -o TESTDRV TESTDRV.o DecryptApi.o -L. -lsddklib
TESTDRV.o:TESTDRV.C
arm-linux-gcc -g -c TESTDRV.C
DecryptApi.o:DecryptApi.C
arm-linux-gcc -g -c DecryptApi.C
/**********End of Makefile*****************/
After compling I recieve the error:
/***********************************************************/
arm-linux-gcc -o TESTDRV TESTDRV.o DecryptApi.o -L. -lsddklib
TESTDRV.o: In function `main':
/home/amittal/CPRM/TESTDRV.C:51: undefined reference to
`NMSecure::NMSec_init(void)'
/home/amittal/CPRM/TESTDRV.C:60: undefined reference to
`NMSecure::NMSec_deinit(void)'
/home/amittal/CPRM/TESTDRV.C:63: undefined reference to
`NMSecure::NMSec_deinit(void)'
TESTDRV.o: In function `secTest(NMSecure *)':
/home/amittal/CPRM/TESTDRV.C:208: undefined reference to
`NMSecure::NMSec_fopen(char *, unsigned char)'
/home/amittal/CPRM/TESTDRV.C:255: undefined reference to
`NMSecure::NMSec_fread(short, unsigned char *, unsigned short)'
/home/amittal/CPRM/TESTDRV.C:299: undefined reference to
`NMSecure::NMSec_fclose(short)'
collect2: ld returned 1 exit status
make: *** [TESTDRV] Error 1
/**********************************************************/
While all these functions (NMSec_init(void),NMSec_deinit(void)) are
defined in
DecryptApi.C.
Any pointers are highly appreciated.
Thanks in Advance,
Regards,
-Archna