Обсуждение: libpq problem - kdevelop

Поиск
Список
Период
Сортировка

libpq problem - kdevelop

От
"Gary S. Brace"
Дата:
Hi, 

I cannot seem to be able to use libpq in a kdevelop c program- I get the error
message upon execution: ./testpg: error loading shared libraries:
libpq.so.2: cannot load shared object file: No such file or directory

include:

#include "libpq-fe.h"

compiler options -> additional options: -I/usr/local/pgsql/include

linker options-> additional libraries: -lpq -L/usr/local/pgsql/include

(/usr/local/pgsql) is the correct path. Anybody know what I'm doing wrong? 

Thanks


Re: libpq problem - kdevelop

От
Tom Lane
Дата:
"Gary S. Brace" <gbrace@cais.com> writes:
> Anybody know what I'm doing wrong? 

The runtime loader isn't finding libpq.so.  This is pretty
platform-dependent, but most likely you need to set LD_LIBRARY_PATH
in your environment or tell ldconfig where to find the library.
        regards, tom lane


RE: libpq problem - kdevelop

От
"Michael Ansley (UK)"
Дата:
<p><font size="2">-----BEGIN PGP SIGNED MESSAGE-----</font><br /><font size="2">Hash: SHA1</font><p><font size="2">In
yourlinker options you are using the include directory, not the</font><br /><font size="2">lib directory.  It should
probablyread:</font><p><font size="2">linker options-> additional libraries: -lpq
-L/usr/local/pgsql/lib</font><p><fontsize="2">Cheers...</font><br /><p><font size="2">MikeA</font><br /><p><font
size="2">>>-----Original Message-----</font><br /><font size="2">>> From: Gary S. Brace [<a
href="mailto:gbrace@cais.com">mailto:gbrace@cais.com</a>]</font><br/><font size="2">>> Sent: 31 July 2001
14:44</font><br/><font size="2">>> To: pgsql-interfaces@postgresql.org</font><br /><font size="2">>>
Subject:[INTERFACES] libpq problem - kdevelop</font><br /><font size="2">>> </font><br /><font size="2">>>
</font><br/><font size="2">>> Hi, </font><br /><font size="2">>> </font><br /><font size="2">>> I
cannotseem to be able to use libpq in a kdevelop c </font><br /><font size="2">>> program- I get the
error</font><br/><font size="2">>> message upon execution: ./testpg: error loading shared libraries:</font><br
/><fontsize="2">>> libpq.so.2: cannot load shared object file: No such file or</font><br /><font
size="2">>>directory  </font><br /><font size="2">>> </font><br /><font size="2">>>
include:</font><br/><font size="2">>> </font><br /><font size="2">>> #include "libpq-fe.h"</font><br
/><fontsize="2">>> </font><br /><font size="2">>> compiler options -> additional options:
-I/usr/local/pgsql/include</font><br/><font size="2">>> </font><br /><font size="2">>> linker options->
additionallibraries: -lpq </font><br /><font size="2">>> -L/usr/local/pgsql/include</font><br /><font
size="2">>></font><br /><font size="2">>> (/usr/local/pgsql) is the correct path. Anybody know what
</font><br/><font size="2">>> I'm doing wrong? </font><br /><font size="2">>> </font><br /><font
size="2">>>Thanks</font><br /><font size="2">>> </font><br /><font size="2">>>
---------------------------(endof </font><br /><font size="2">>> broadcast)---------------------------</font><br
/><fontsize="2">>> TIP 4: Don't 'kill -9' the postmaster</font><br /><font size="2">>> </font><p><font
size="2">-----BEGINPGP SIGNATURE-----</font><br /><font size="2">Version: PGPfreeware 6.5.3 for non-commercial use
<<ahref="http://www.pgp.com" target="_blank">http://www.pgp.com</a>></font><p><font
size="2">iQA/AwUBO2lJP3ympNV/C086EQLZZgCg8z/nR+rIuA7rTsNfmuRHGx6SLx0AoIEP</font><br/><font
size="2">l4OzEXziS+dhyk15+yVB/87A</font><br/><font size="2">=pA9J</font><br /><font size="2">-----END PGP
SIGNATURE-----</font><code><fontsize="3"><br /><br />
_________________________________________________________________________<br/> This e-mail and any attachments are
confidentialand may also be privileged and/or copyright <br /> material of Intec Telecom Systems PLC (or its affiliated
companies).If you are not an <br /> intended or authorised recipient of this e-mail or have received it in error,
pleasedelete <br /> it immediately and notify the sender by e-mail. In such a case, reading, reproducing, <br />
printingor further dissemination of this e-mail is strictly prohibited and may be unlawful. <br /> Intec Telecom
SystemsPLC. does not represent or warrant that an attachment hereto is free <br /> from computer viruses or other
defects.The opinions expressed in this e-mail and any <br /> attachments may be those of the author and are not
necessarilythose of Intec Telecom <br /> Systems PLC. <br /><br /> This footnote also confirms that this email message
hasbeen swept by<br /> MIMEsweeper for the presence of computer viruses. <br />
__________________________________________________________________________<br/></font></code>