S
sam_cit
I have the following files and their code,
main.c
extern void test1();
int main()
{
printf("...in main...\n");
test1();
return(0);
}
test.c
void test1()
{
printf("...in test1...\n");
}
cc -c test.o
ar -rc libtest.a test.o
cc main.o -L /path -ltest -o sample
It works and i get expected results, however my doubt is that the
static library that i created is libtest.a but i specify only test in
the
cc command and it still works. Can anyone tell how cc finds the
correct static library?
Thanks in advance!!!
main.c
extern void test1();
int main()
{
printf("...in main...\n");
test1();
return(0);
}
test.c
void test1()
{
printf("...in test1...\n");
}
cc -c test.o
ar -rc libtest.a test.o
cc main.o -L /path -ltest -o sample
It works and i get expected results, however my doubt is that the
static library that i created is libtest.a but i specify only test in
the
cc command and it still works. Can anyone tell how cc finds the
correct static library?
Thanks in advance!!!