| From: | Jim Parker <hparker(at)fit(dot)edu> |
|---|---|
| To: | pgsql-interfaces(at)postgresql(dot)org |
| Subject: | Linking ECPG files to a C program |
| Date: | 2002-03-05 23:08:22 |
| Message-ID: | 200203052308.g25N8OTW010944@smtp-server1.tampabay.rr.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-interfaces |
G'Day !
I have a very confusing problem.
I am trying to link files using a ECPG interface to a postgresql database
to a vector drawing program.
My test programs (when compiled by hand) work great, but when I use a
makefile to compile the modules and the regular C program, the linker gives
me undefined references to the ECPG routines.
I am using suffix rules in my Makefile as follows:
.pgc.c:
ecpg -t $(PG_INC) $< $*.c
.c.o:
$(CC) -c ($PG_INC) $(CFLAGS) $< -o $*.o
test_db: $(DB_OBJS) $(TEST_OBJS)
$(CC) $(GTKLIB) $(LIBS) -o test_db $(DB_OBJS) $(TEST_OBJS)
Should I create a library to hold the ECPG routines ?
Does anyone have any example code/Makefile I can look at ?
TIA
cheers,
Jim Parker
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jose Luis LG | 2002-03-06 09:32:08 | Re: Error passing parameter to functions |
| Previous Message | Hubert Palme | 2002-03-05 20:33:44 | Re: PL/pgSQL Syntax Problem |