I am trying to get the following program to compile the following program with Embedded SQL Processor:
#include <stdio.h>
main()
{
printf( "I am alive\n" );
#if 0
EXEC SQL CONNECT TO DEFAULT;
#endif
printf( "status is %d\n", sqlca.sqlcode );
}
I am doing this as a test that Postgres is properly installed on my system. Here is how I compile the file (prog1.pgc):
INCDIR="/cygdrive/c/Program Files/PostgreSQL/8.3/include"
LIBDIR="/cygdrive/c/Program Files/PostgreSQL/8.3/lib"
ecpg prog1.pgc
cc -g -I "/cygdrive/c/Program Files/PostgreSQL/8.3/include" prog1.c
cc -g -o prog1 prog1.o -L "/cygdrive/c/Program Files/PostgreSQL/8.3/lib" -lecpg
The result is that a get an undeclared identifier of: _ECPGget_sqlca from the linker. I am hoping that somebody can tell me what I am doing
wrong.
Thanks
Bob Sherry