Compile OCI and Postgres

I

iavian

I have a C Code like below with refers to both Oracle and Postgres
client libraries

#include "postgres.h"
#include "fmgr.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <oci.h>

make -f demo_rdbms.mk build OBJS=pemsPg.o

pemsPg.c:1:22: postgres.h: No such file or directory
pemsPg.c:2:18: fmgr.h: No such file or directory
 
F

Flash Gordon

iavian wrote, On 08/05/08 20:59:
I have a C Code like below with refers to both Oracle and Postgres
client libraries

#include "postgres.h"
#include "fmgr.h"

pemsPg.c:1:22: postgres.h: No such file or directory
pemsPg.c:2:18: fmgr.h: No such file or directory

Obviously you need to install the headers (and anything else required to
build against those libraries) and do whatever the library documentation
says you need to do to use it. Both Oracle and Postgres have formums of
one sort or another dedicated to development with them and they will
know a lot more about using the libraries than a random collection of C
programmers.
 
A

Antoninus Twink

#include "postgres.h"
#include "fmgr.h" [snip]
pemsPg.c:1:22: postgres.h: No such file or directory
pemsPg.c:2:18: fmgr.h: No such file or directory

These headers might be in subdirectories of your main system include
directory. For example,
#include "postgresql/postgres.h"
#include "postgresql/fmgr.h"
might work (or check the path on your system).

You should also consider using <...> instead of "..." for system-wide
headers, and client-side code should normally include postgres_fe.h
instead of postgres.h.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
44,998
Latest member
MarissaEub

Latest Threads

Top