🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Compilar fuente C que accede a postgres?

#15139
From: dre
Date: Fri, 11 Aug 2000 00:00
33 lines
1746 bytes
In article <8n0f18$een$1@talia.mad.ttd.net>, "Borja"
<svillarroyag@nexo.es> wrote:
> El otro dia preguntaba como se compilaba un fuente en C que accede a BdD
> Postgres y me respondio "batsman" esto:
> 
> ------------------------------------
> 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
> --------------------------------------
> 
> Lo he hecho Y me dice que no encuentra la biblioteca:
> 
> -----------------------------------------------
> [sistemas@piton ejem1]$ gcc -c pru.c -I/usr/include/pgsql
> [sistemas@piton ejem1]$ gcc -o pru -L/usr/lib pru.o -lpg
> /usr/bin/ld: cannot open -lpg: No such file or directory
> collect2: ld returned 1 exit status
> [sistemas@piton ejem1]$
> ------------------------------------------------
> 
> No tengo el fichero "libpg.so" en el dir "/usr/lib" -> tengo el
> "libpg.so.2"
> 
> Sabe alguien que me puede ocurrir (No tengo ningun problema en acceso a
> traves de perl)
> 
> 

ln -s /usr/lib/libpg.so.2 /usr/lib/libpg.so

un saludo
dre
Technical Details
Message-ID: <8n0o3i$qc7$1@news.unizar.es>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <8n0f18$een$1@talia.mad.ttd.net>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,301934f33b7b630e
X-Google-Attributes: gidf86c8,public
From: "dre" <dre@ozu.es>
Subject: Re: Compilar fuente C que accede a postgres?
Date: 2000/08/11
Message-ID: <8n0o3i$qc7$1@news.unizar.es>
X-Deja-AN: 657120485
References: <8n0f18$een$1@talia.mad.ttd.net>
X-Complaints-To: usenet@news.unizar.es
X-Trace: news.unizar.es 965993394 27015 155.210.155.222 (11 Aug 2000 11:29:54 GMT)
Organization: Universidad de Zaragoza
NNTP-Posting-Date: 11 Aug 2000 11:29:54 GMT
Newsgroups: es.comp.os.linux.programacion