J
jitendar.rawat
Hi,
I am trying to create a library and want its user to define a function
in their executable if that library is linked. some thing like, if some
uses my library and haven't defined a function like
void Initialize( long a, long b)
{
}
at link time I should get an error like "unresolved symbols"
I am able to get it done if I create a dummy fnction in header file of
library which indirectly calls this function, whose decleration is
persent in the library, but no defination is given.
But the loop-hole remains, if some one modifies the header and then
uses the library. I am trying it out on UNIX. Please let me know if
this needs to be posted in the UNIX group. for gcc compiler there is an
option "-rdynamic" , but not finding the same for CC compiler
regards,
Jitu
I am trying to create a library and want its user to define a function
in their executable if that library is linked. some thing like, if some
uses my library and haven't defined a function like
void Initialize( long a, long b)
{
}
at link time I should get an error like "unresolved symbols"
I am able to get it done if I create a dummy fnction in header file of
library which indirectly calls this function, whose decleration is
persent in the library, but no defination is given.
But the loop-hole remains, if some one modifies the header and then
uses the library. I am trying it out on UNIX. Please let me know if
this needs to be posted in the UNIX group. for gcc compiler there is an
option "-rdynamic" , but not finding the same for CC compiler
regards,
Jitu