Thread: ecpg and include files

ecpg and include files

From
"Jochen Weyermanns"
Date:

Hi !

After I posted my problem to the novice list, I have found some problem
descriptions in this general list,
which are quite similar to my problem with the ecpg.
Unfortunately I did not found any corresponding answer, can anybody give me a
hint ?

I installed PostgreSQL 6.5.3 on i686-pc-linux-gnu, compiled by gcc egcs-2.91.66
(Linux Suse 6.3, Kernel 2.2.13),
succeeded in running the postmaster, creating a database and doing SQL with
psql.

Then I let run the ecpg on a C program, which uses embedded SQL and is in the
style of
applications I have written for Oracle databases, but the ecpg causes the
following error message:

     in line 19ot open include file sqlca. ( I think  "in line 19: could not
open include file sqlca." was intended)

for the statement at line 19:
EXEC SQL INCLUDE sqlca;

What can I do to solve this problem ? According to the documentation the
statement above should work.

Path information and so on seem to be OK, moreover the ecpg used with option
--v shows:
     ecpg - the postgresql preprocessor, version: 2.6.0
     exec sql include ... search starts here:
      .
      /usr/local/include
      /usr/local/pgsql/include
      /usr/include
     End of search list.

  ( with sqlca.h at the right place:
     ls -l /usr/local/pgsql/include/sqlca.h
  leads to:
     -r--r--r--   1 postgres daemon        957 Jun 28 16:08
/usr/local/pgsql/include/sqlca.h
  )

The error message turns up even when I use ecpg -I/usr/loca/pgsql/include

Thanks in advance,
Jochen Weyermanns



Re: ecpg and include files

From
Michael Meskes
Date:
On Fri, Jun 30, 2000 at 02:08:17PM +0200, Jochen Weyermanns wrote:
> Path information and so on seem to be OK, moreover the ecpg used with option
> --v shows:
>      ecpg - the postgresql preprocessor, version: 2.6.0
>      exec sql include ... search starts here:
>       .
>       /usr/local/include
>       /usr/local/pgsql/include
>       /usr/include
>      End of search list.
>
>   ( with sqlca.h at the right place:
>      ls -l /usr/local/pgsql/include/sqlca.h
>   leads to:
>      -r--r--r--   1 postgres daemon        957 Jun 28 16:08
> /usr/local/pgsql/include/sqlca.h
>   )
>
> The error message turns up even when I use ecpg -I/usr/loca/pgsql/include

I'm at a loss here. I never expereienced something like this. What happens
if you install sqlca.h into '.'?

Michael
--
Michael Meskes
Michael@Fam-Meskes.De
Go SF 49ers! Go Rhein Fire!
Use Debian GNU/Linux! Use PostgreSQL!