Problem with kerberos cpp project

Hi All,
I am having problem with kerberos kadmin library in c++.
I am using red hat linux Enterprise Linux Server release 5 (Tikanga), and gcc c++ - 4.1.1-52.el4.i386.
When I make a c project (main.c) and use function from kadmin library such as
kadm5_init_krb5_context(&context);
kadm5_init_with_password(................);
It runs fine.

But when I make a cpp project (main.cc) and use the same function from kadmin library, it give me error saying
undefined reference to 'kadm5_init_krb5_context(......);
undefined reference to kadm5_init_with_password(..........);

I dont understand if I use the same setting in both projects such as include and library files. But runs fine when c project but has problem with cpp project..What is the problem?????
What am I doing wrong, please help, I am stuck.
I have also tried the same on other machine also but same error.

Note: I am using kerberos 5 verion 1.6.3. and I am able to run kerberos api perfectly.
Thanks in advance.

Regards,
Amit Pawar

You have to link some *.so or *.a library to your program from kerberos kadmin project.

Best regards,

Iliyan Varshilov

Hi Iliyan,
Sorry I forgot to specify earlier that i have already included kadmin client .so file (sorry i dont remember the name of .so file and i am at home now) ,
Since I have included .so file thats why its working with c language, but i have the problem when i build a c++ project.

Let me know if i an unable to explain you the problem. I'll clarify your doubts about existing problem.