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

Shared library major version number

How do I get gcc to link in the shared library major version number?

I get this:         
gcc -o psql -L../../interfaces/libpq psql.o stringutils.o   -lpq -lcrypt -ldld 
-lnsl -ldl
-lm -lreadline -lhistory -lcurses  -export-dynamic -Wl,-rpath 

linda:/usr/src/postgresql-6.2.1$ ldd debian/tmp/usr/bin/psql
        libpq.so => /usr/lib/postgresql/lib/libpq.so (0x4000c000)
              ^^                                  ^^I
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x4001c000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x40049000)
        libdl.so.2 => /lib/libdl.so.2 (0x4004f000)
        libm.so.6 => /lib/libm.so.6 (0x40052000)
        libreadline.so.2 => /lib/libreadline.so.2 (0x4006b000)
        libhistory.so.2 => /usr/lib/libhistory.so.2 (0x4008d000)
        libncurses.so.3.4 => /lib/libncurses.so.3.4 (0x40095000)
        libc.so.6 => /lib/libc.so.6 (0x400da000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

linda:/usr/src/postgresql-6.2.1$ /sbin/ldconfig -p | grep libpq
        libpq.so.1.0.0 (ELF) => /usr/lib/postgresql/lib/libpq.so.1.0.0
        libpq.so.1 (ELF) => /usr/lib/postgresql/lib/libpq.so.1
        libpq.so (ELF) => /usr/lib/postgresql/lib/libpq.so

but I cannot find any way to make it link to libpq.so.1 instead.
All the other libraries seem to get linked in that way without any
special instructions.

Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver

PGP key from public servers; key ID 32B8FAA1

Unsolicited email advertisements are not welcome; any person sending
such will be invoiced for telephone time used in downloading together
with a £25 administration charge.

TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org .
Trouble?  e-mail to templin@bucknell.edu .

Reply to: