linking question

From: Ellen Davis <daviser_at_email.uc.edu>
Date: Tue, 27 May 1997 09:40:28 -0400

I have made the Berkeley DB library (libdb.a) and installed it in
/usr/local/lib. However, when I try to link it in my program I get
unresolved link errors:

# cc -g -o z z.c -L/usr/local/lib -ldb -I/usr/local/include
ld:
Unresolved:
db_appinit
db_open
#

I have found that there already exists an older version of the db library
in /usr/lib. If I rename /usr/local/lib/libdb.a to libdb2.a and use it,
the above command works fine.

#cc -g -o z z.c -L/usr/local/lib -ldb2 -I/usr/local/include
#

I thought the -L option was supposed to override the search order for
libraries. Is there something wrong with the way I am using this option?


 Ellen Davis
Received on Tue May 27 1997 - 15:59:53 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:36 NZDT