Compile OCI and Postgres

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • iavian

    Compile OCI and Postgres

    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


  • Antoninus Twink

    #2
    Re: Compile OCI and Postgres

    On 8 May 2008 at 19:59, iavian wrote:
    #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.

    Comment

    • Flash Gordon

      #3
      Re: Compile OCI and Postgres

      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"
      <snip>
      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.
      --
      Flash Gordon

      Comment

      • CBFalconer

        #4
        Re: Compile OCI and Postgres

        iavian wrote:
        >
        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
        Those, and oci.h, are not available as standard C include files.
        You need to ask on some newsgroup that deals with Oracle and/or
        Postgres.

        --
        [mail]: Chuck F (cbfalconer at maineline dot net)
        [page]: <http://cbfalconer.home .att.net>
        Try the download section.


        ** Posted from http://www.teranews.com **

        Comment

        Working...