Skip site navigation (1) Skip section navigation (2)

RE: Has anybody compiled .c file generated from .pgc file

From: "Riebs, Andy" <Andy(dot)Riebs(at)compaq(dot)com>
To: "'Chandra Sekhar (dot) K'" <csekhar(at)cisco(dot)com>, pgsql-ports(at)postgresql(dot)org
Subject: RE: Has anybody compiled .c file generated from .pgc file
Date: 2000-11-06 16:08:50
Message-ID: 9996FB0C6AB3D111B9FB0000F81E38A20658F1F7@lkgexc1.tay.dec.com (view raw or flat)
Thread:
Lists: pgsql-ports
> I have been trying to run a sample code for postgreSQL
> database.  I just want to create a database and do simple
> insertion and extraction of the inserted data. I have
> created .pgc file and am able to generate .c file using
> ecpg but I am stuck with gcc , not able to create the
> binary from .c file. 

Use a Makefile to specify the locations of the libraries,
such as...

-----snip-----
SRCDIR=../postgres/src
CFLAGS+=-I$(SRCDIR)/include
CFLAGS+=-I$(SRCDIR)/interfaces/libpq
CFLAGS+=-I$(SRCDIR)/interfaces/ecpg/include 
LIBPQDIR=$(SRCDIR)/interfaces/libpq
LIBECPGDIR=$(SRCDIR)/interfaces/ecpg/lib
LDFLAGS+=-L$(LIBPQDIR) -lpq
LDFLAGS+=-L$(LIBECPGDIR) -lecpg
LDFLAGS+=-g
%.c : %.pgc
	ecpg -t -o $@ $<
-----snip-----

/andy

---
Andy Riebs, andy(dot)riebs(at)compaq(dot)com    Alpha Technology Solutions Group
978-506-6628, fax 978-506-6524       Compaq Computer Corporation
(h) andy(at)freckles(dot)mv(dot)com            <http://www.linuxalpha.compaq.com>

pgsql-ports by date

Next:From: Chandra Sekhar . KDate: 2000-11-06 21:09:38
Subject: Has anybody compiled .c file generated from .pgc file
Previous:From: Kirsebom NikolaiDate: 2000-11-06 09:52:01
Subject: PostgreSQL on NT

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group