Linking ECPG files to a C program

Поиск
Список
Период
Сортировка
От Jim Parker
Тема Linking ECPG files to a C program
Дата
Msg-id 200203052308.g25N8OTW010944@smtp-server1.tampabay.rr.com
обсуждение исходный текст
Список 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



В списке pgsql-interfaces по дате отправления:

Предыдущее
От: hubert.palme@web.de (Hubert Palme)
Дата:
Сообщение: Re: PL/pgSQL Syntax Problem
Следующее
От: "Jose Luis LG"
Дата:
Сообщение: Re: Error passing parameter to functions