[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

static library supercedes shared library?



Hi mentors,

I recently adopted camediaplay, which uses non-FHS lock files for
serial devices; I decided to do it right by installing liblockdev1 and
liblockdev1-dev and patching the source to use them.

It works fine, but the liblockdev1 functions get linked statically to
camediaplay, rather than dynamically (shared), and I don't know how to
change the gcc invocations (or something else) to force it to use the
shared library.

After reading the gcc howto, and some experimenting, I discovered that
if I move /usr/lib/liblockdev1.a out of the way, the functions get
linked shared (unresolved) as desired, but that's certainly not the
correct way to force it to do what I want.

What am I doing wrong?  Thanks.

...
make[1]: Entering directory `/var/home/david/debian-packages/camediaplay/camediaplay-20010211/build'
cc  -c -O -I. -I./../include  -DHAVE_LIBLOCKDEV -c ./../src/main.c
cc  -c -O -I. -I./../include  -DHAVE_LIBLOCKDEV -c ./../src/uucplock.c
cc -o camediaplay main.o uucplock.o -llockdev
make[1]: Leaving directory `/var/home/david/debian-packages/camediaplay/camediaplay-20010211/build'
touch build-stamp



Reply to: