Thread: Postgres problem when compiling C++ in Red Hat 6.2

Postgres problem when compiling C++ in Red Hat 6.2

From
"Mike S. Nowostawsky"
Date:
I'm taking a course in C++ and have problems compiling for Postgres at home
with Red hat 6.2 (have 7.1 at school). I tried upgrading to 7.1 but can't get x-win to work.
I also tried to get the upgrades to Postgres for 6.2, but they won't install successfully.
As it stands I can't get C++ to work with Postgres.
The compile script the teacher gave us for 7.1 is:
    c++ -o sql_test -I/usr/include/pgsql -lpq++ using_sql.c++
but when I run it it gives me this error:
    sql_test.c++:7: pgsql/libpq++.h: No such file or directory
Any idea what the correct syntax is for the compile statement for Red Hat 6.2 compared
to the 7.1 syntax above?
Thx.
-- 
===============================================
 Mike Nowostawsky:
 Email: mikenowo@sympatico.ca, mikenowo@yahoo.ca
 Home Page: http://www3.sympatico.ca/mikenowo/
 Lachine (Montreal), Quebec, Canada
 

Re: Postgres problem when compiling C++ in Red Hat 6.2

From
teg@redhat.com (Trond Eivind Glomsrød)
Date:
"Mike S. Nowostawsky" <mikenowo@sympatico.ca> writes:

> I'm taking a course in C++ and have problems compiling for Postgres at home
> with Red hat 6.2 (have 7.1 at school). I tried upgrading to 7.1 but
> can't get x-win to work.

What's the problem?

> I also tried to get the upgrades to Postgres for 6.2, but they won't install successfully.
>
> As it stands I can't get C++ to work with Postgres.
>
> The compile script the teacher gave us for 7.1 is:
>
>     c++ -o sql_test -I/usr/include/pgsql -lpq++ using_sql.c++
>
> but when I run it it gives me this error:
>
>     sql_test.c++:7: pgsql/libpq++.h: No such file or directory

Do you have postgresql-devel installed?

--
Trond Eivind Glomsrød
Red Hat, Inc.

Re: Postgres problem when compiling C++ in Red Hat 6.2

From
Lamar Owen
Date:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Friday 18 May 2001 00:51, Mike S. Nowostawsky wrote:
> I also tried to get the upgrades to Postgres for 6.2, but they won't
> install successfully.

Details?  As I built the PostgreSQL set for 6.2 on a 6.2 box, I am very
curious as to the details.  Have you updated to at least RPM 3.0.5?

>     sql_test.c++:7: pgsql/libpq++.h: No such file or directory

> Any idea what the correct syntax is for the compile statement for Red Hat
> 6.2 compared

libpq++.H instead of libpq++.h on out-of-the-box Red Hat 6.2, IIRC.

- --
Lamar Owen
WGCR Internet Radio
1 Peter 4:11
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE7BWYz5kGGI8vV9eERAvbrAKCc0h2ooiox8mc6dB/5V9ExxWWocgCg8QMI
l7GcnWfqbJHNE3m9titD1yE=
=9LD6
-----END PGP SIGNATURE-----

Re: Postgres problem when compiling C++ in Red Hat 6.2

From
Peter Eisentraut
Date:
Mike S. Nowostawsky writes:

> The compile script the teacher gave us for 7.1 is:
>
>     c++ -o sql_test -I/usr/include/pgsql -lpq++ using_sql.c++
>
> but when I run it it gives me this error:
>
>     sql_test.c++:7: pgsql/libpq++.h: No such file or directory

Change #include "pgsql/libpq++.h" to #include "libpq++.h".

--
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter