From: | "Surabhi Ahuja " <surabhi(dot)ahuja(at)iiitb(dot)ac(dot)in> |
---|---|
To: | "Michael Fuhr" <mike(at)fuhr(dot)org> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: error while loading shared libraries: libpq.so.3 |
Date: | 2005-02-21 08:52:20 |
Message-ID: | CE5C48E227F8ED4990FAC4332100ADC621B4FF@EVS.iiitb.ac.in |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I give the following command now to compile sample.c
gcc -o sample sample.c -I/usr/local/pgsql/include -L/usr/local/pgsql/lib -rpath/usr/local/pgsql/lib - lpq
it gives this message:
gcc: unrecognized option `-rpath/usr/local/pgsql/lib'
(the same happens if i give -R instaed of -rpath
________________________________
From: Michael Fuhr [mailto:mike(at)fuhr(dot)org]
Sent: Mon 2/21/2005 12:55 PM
To: Surabhi Ahuja
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] error while loading shared libraries: libpq.so.3
***********************
Your mail has been scanned by InterScan VirusWall.
***********-***********
On Mon, Feb 21, 2005 at 12:47:58PM +0530, Surabhi Ahuja wrote:
> cc -I/usr/local/pgsql/include sample.c -L/usr/local/pgsql/lib -lpq -o sample
> I then run it....and it gives and error
> [indra:/homes/surabi] ./sample
> ./sample: error while loading shared libraries: libpq.so.3: cannot open shared object file: No such file or directory
You probably need to specify a runtime library search path option
like -R or -rpath (see your compiler or linker documentation). For
example, the following might work:
cc -L/usr/local/pgsql/lib -R/usr/local/pgsql/lib ...
See also the manual page for the ldd command if your system has it.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
From | Date | Subject | |
---|---|---|---|
Next Message | Surabhi Ahuja | 2005-02-21 09:05:45 | Re: error while loading shared libraries: libpq.so.3 |
Previous Message | Russell Smith | 2005-02-21 08:49:24 | Re: error while loading shared libraries: libpq.so.3 |