Article View: es.comp.os.linux.programacion
Article #15144Re: Como compilo un prog en C que accede a postgres
From: batsman
Date: Sat, 12 Aug 2000 00:00
Date: Sat, 12 Aug 2000 00:00
60 lines
2683 bytes
2683 bytes
-----BEGIN PGP SIGNED MESSAGE-----
>> El Fri, 11 Aug 2000 13:52:36 +0200, algo o alguien alter�
>> el estado del teclado de Manuel L�pez Moreno
>> y al poco rato lleg� a es.comp.os.linux.programacion lo siguiente:
> Tal d�a Fri, 11 Aug 2000 00:42:43 +0000,
> batsman <batsman@simpsons.for.ever> nos relat�:
>
>> >Y si pongo $ gcc pru.c -o pru -lpg
>> > dice que no sabe lo que es lpg.
>>
>> Procura separar compilar/enlazar.
>
>Querr�s decir "prueba", �no?
>Porque t� sabes que...
>
>> Primero
>> gcc -c pru.c -I/usr/include/pgsql
>>
>> despu�s
>> gcc -o pru -L/path/de/librer�a pru.o -lpg
>
>... es equivalente a:
>
> $ gcc pru.c -o pru -I/usr/include/pgsql -L/path/de/librer�a -lpg
S�, claro. Es la costumbre de enlazar m�s de un m�dulo...
No me convence eso de hacerlo todo en un s�lo paso.
>> Suponiendo que tienes la librer�a libpg.so en /path/de/librer�a
>
>Eso debe ser lo que est� fallando, que no tiene la librer�a (o no
>la encuentra).
Tiene que poner bien el link a libpg.so y usar ldconfig.
- --
_ _
| |__ __ _| |_ ___ _ __ ___ __ _ _ __
| '_ \ / _` | __/ __| '_ ` _ \ / _` | '_ \
| |_) | (_| | |_\__ \ | | | | | (_| | | | |
|_.__/ \__,_|\__|___/_| |_| |_|\__,_|_| |_|
Real email: batsman dot geo at yahoo dot com
-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: noconv
Comment: Public key via email: send mail with Subject: [PGPKEY]
iQEVAwUBOZWkE70Y27yr0iefAQHy3Qf/azfHqfP8i3kyoBSb+U0Kz1mAfetf/bAm
x3LKokitekIMjmgtepM/FnIq61cQAKhYTw3ppYV+cFXr2aljytuyvux6ugKVJ5U5
mye+WG5n6g7gl5hlh2Qf34vBrZ8D3tEc1tzAdHhxyxb8KhJHBmNY0GsTlAVVgl+8
e/f8sXBmdzne/DHd4FqxZtx/kyzon2YS/mxvzeifb93ITu/YZWgyfUPEe2aDEt1v
RFmK/+Ys382DmX5msoKl9GRdEiEW5x/ff6V1U5vcgyCVeDRqvK5VcDuY7Mx7C9gA
fvAlbcw2EuGCi9BMsAozWk2PzlZjAfJajmLKQPkwX8f3DVzPvlZ8aQ==
=gOry
-----END PGP SIGNATURE-----
Technical Details
Message-ID:
<o684n8.q69.ln@simpsons4ever>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<8mtueo$h7k$1@talia.mad.ttd.net> <36ivm8.st7.ln@simpsons4ever> <slrn8p7q84.l0.luname@mantium.luname.net>Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII X-Google-Thread: f86c8,a38ae73354966cf5 X-Google-Attributes: gidf86c8,public From: batsman@simpsons.for.ever (batsman) Subject: Re: Como compilo un prog en C que accede a postgres Date: 2000/08/12 Message-ID: <o684n8.q69.ln@simpsons4ever> X-Deja-AN: 657647179 Content-Transfer-Encoding: 8bit References: <8mtueo$h7k$1@talia.mad.ttd.net> <36ivm8.st7.ln@simpsons4ever> <slrn8p7q84.l0.luname@mantium.luname.net> Content-Type: text/plain; charset=iso-8859-1 Organization: Uso Debian 2.1 Slink Mime-Version: 1.0 User-Agent: slrn/0.9.5.3 (UNIX) Reply-To: see_signature-mira_firma Newsgroups: es.comp.os.linux.programacion