Problem building an API program against 1.4.1

Mike Friedman mikef at ack.Berkeley.EDU
Sun Jul 31 15:16:20 EDT 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sun, 31 Jul 2005 at 11:35 (-0700), Russ Allbery wrote:

>> Here's the Makefile I use to build my program:
>
>> krb5ver:
>>  	gcc -Wall -c -I/usr/local/kerberos/include krb5ver.c
>>  	gcc -o krb5ver krb5ver.o  -L/usr/local/kerberos/lib -lk5crypto -lkrb5 -lcom_err
>
> If you install libraries in a non-standard location that the dynamic 
> linker doesn't know about, you have to encode the path to the libraries 
> into the binary.  Adding -R/usr/local/kerberos/lib will probably fix the 
> problem.

Russ,

Thanks, that fixed it!  I must say, I didn't even know about the -R option 
to gcc and can't find it in the gcc man page.  What does -R do anyway?

I had just assumed that the '-L/usr/local/kerberos/lib' would be 
sufficient to tell the linker where to find the libraries.  Why did only 
libk5crypto have a problem and not, for example, libkrb5?

(My knowledge about linking is clearly inadequate).

Thanks again.

Mike

_____________________________________________________________________
Mike Friedman                   System and Network Security
mikef at ack.Berkeley.EDU          2484 Shattuck Avenue
1-510-642-1410                  University of California at Berkeley
http://ack.Berkeley.EDU/~mikef  http://security.berkeley.edu
_____________________________________________________________________

-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5.8

iQA/AwUBQu0jiK0bf1iNr4mCEQLbngCgg1DINvnK6cyVnMouyojG1v1z1QcAn0hb
vtB/gshqU1KzA+KeUb7ZJJyF
=rUAV
-----END PGP SIGNATURE-----


More information about the Kerberos mailing list