🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #15135

Re: Como compilo un prog en C que accede a postgres

#15135
From: batsman
Date: Fri, 11 Aug 2000 00:00
49 lines
2125 bytes
-----BEGIN PGP SIGNED MESSAGE-----


  >> El teclado de Perico de los palotes fue pose�do por un ser maligno, 
  >> que escribi� en es.comp.os.linux.programacion:

>Tengo el RedHat 6.1
>
>Si pongo $ gcc pru.c -o pru
>
>dice que le falta definiciones.
>
>En el programa incluyo     #include "libpq-fe.h"
>
>Y si pongo $ gcc pru.c -o pru -lpg
>    dice que no sabe lo que es lpg.

Procura separar compilar/enlazar.

Primero 
gcc -c pru.c -I/usr/include/pgsql

despu�s
gcc -o pru -L/path/de/librer�a pru.o -lpg

Suponiendo que tienes la librer�a libpg.so en /path/de/librer�a

- -- 
              _           _                             
             | |__   __ _| |_ ___ _ __ ___   __ _ _ __  
             | '_ \ / _` | __/ __| '_ ` _ \ / _` | '_ \ 
             | |_) | (_| | |_\__ \ | | | | | (_| | | | |
             |_.__/ \__,_|\__|___/_| |_| |_|\__,_|_| |_|

             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]

iQEVAwUBOZNL/r0Y27yr0iefAQHqFwf+JxpqjfdLcF3t3lMXK5fKfN6mV+qgyrAL
UdMC3tpQednGSBz0rwDSOP5VqV5NPlTIZ3WBxO3cZ9mpomteInKtv3tQD5nwv2C3
T1JgHb1lO/BGdClbzH7Wu7zEqkirtlh8oMii+tb2jTym4EOErmVHoG/HGbTlm+pQ
NO3xM9dy19jyrRR5/t+GJZMdQij8qLtq5HZrLbCHLv0DLJEUQwnn15fHP01uilUx
od86al0B1yjDgRZLLXbE8USNJ11TmK7/hMsMZzBXMqGF7EyvryqOt+PonEJ2034F
eU+jtwj+zN64C3EknlFpMaszIdaa/3axQhRQ7qDZosji8MeMZkso/A==
=W21G
-----END PGP SIGNATURE-----
Technical Details
Message-ID: <36ivm8.st7.ln@simpsons4ever>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <8mtueo$h7k$1@talia.mad.ttd.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/11
Message-ID: <36ivm8.st7.ln@simpsons4ever>
X-Deja-AN: 656963190
Content-Transfer-Encoding: 8bit
References: <8mtueo$h7k$1@talia.mad.ttd.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