Hello. I'm using LM3S6965 Eval Board and trying to connect to postgresql using libpq library. As a starting point I take enet_io example.
As said in PostgreSQL 8.4.4 Documentation (http://www.postgresql.org/docs/8.4/interactive/libpq-build.html) we must do the following 3 things:
1. "Include the libpq-fe.h header file."
I added libpq-fe.h file to the project and added line #include <libpq-fe.h> to the enet_io.c file
2. "Point your compiler to the directory where the PostgreSQL header files were installed, If you are using makefiles then add the option to the CPPFLAGS variable:
CPPFLAGS += -I/usr/local/pgsql/include"
Here I encounter some difficulies:
there is a Makefile in C:\StellarisWare\boards\ek-lm3s6965\enet_io Is that what is needed ?
I added the last line to the IPATH like this, is that right?
#
# Where to find header files that do not live in the source directory.
#
IPATH=.
IPATH+=..
IPATH+=../../..
IPATH+=../../../third_party/lwip-1.3.2/apps
IPATH+=../../../third_party/lwip-1.3.2/ports/stellaris/include
IPATH+=../../../third_party/lwip-1.3.2/src/include
IPATH+=../../../third_party/lwip-1.3.2/src/include/ipv4
IPATH+=C:\Temp\postgresql-8.4.4\src\include
3. "When linking the final program, specify the option -lpq so that the libpq
library gets pulled in, as well as the option -Ldirectory to
point the compiler to the directory where the libpq library resides. (Again, the
compiler will search some directories by default.) For maximum
portability, put the -L option before the -lpq option."
Where can I specify such options in CCS?