boaconstrictor
Programmer
Hy there,
I have just started to program my first embedded sql program. I could generate the c file, but when I try to link the file I get always the errormassage mentioned in the title.
Does anybody have an idea what the problem could be?
I am using Linux Mandrake and the KDevelop Version 3.0.3.
Here is the c-file:
...and the makefile:
I have just started to program my first embedded sql program. I could generate the c file, but when I try to link the file I get always the errormassage mentioned in the title.
Does anybody have an idea what the problem could be?
I am using Linux Mandrake and the KDevelop Version 3.0.3.
Here is the c-file:
Code:
/*##################################################*/
/* Processed by ecpg (2.9.0) */
/* These three include files are added by the preprocessor */
#include <ecpgtype.h>
#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
#line 1 "update.pgc"
int main()
{
{ ECPGconnect(__LINE__, "test" , NULL,NULL , NULL, 1); }
#line 3 "update.pgc"
{ ECPGdo(__LINE__, NULL, "update number set name = 'The Answer to the Ultimate Question' where intval = 42", ECPGt_EOIT, ECPGt_EORT);}
#line 6 "update.pgc"
{ ECPGtrans(__LINE__, NULL, "commit");}
#line 7 "update.pgc"
{ ECPGdisconnect(__LINE__, "ALL");}
#line 8 "update.pgc"
return 0;
}
/*####################################################*/
...and the makefile:
Code:
/*####################################################*/
# Base directories for the PostgreSQL installation
INC = /usr/include/pgsql
CFLAGS = -I$(INC)
LDLIBS = -lpq
update: update.o
gcc $(LDLIBS) -o update update.o
update.o: update.c
gcc -c $(CFLAGS) update.c
/*###################################################*/