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