[Gdal-dev] compile problem gdal 1.4 on windows with postgresql
support
Mateusz Loskot
mateusz at loskot.net
Thu Jan 18 10:44:00 EST 2007
Dolf Andringa wrote:
> I want to include PostgreSQL support though, so I specified the location
> of the PostgreSQL 8.1 include and lib dirs. I have the PostgreSQL 8.1
> development stuff installed.
Dolf,
Please, show us the exact path you set for PG_INC_DIR.
> During compilation though, I get the error that libpq-fe.h could not
> be found.
> I checked the include dir, and indeed I do not have libpq-fe.h but
> libpq-fs.h
> If I change the filename from libpq-fs.h to libpq-fe.h I get syntax
> errors though during compilation.
You DON NOT need to rename this file.
libpq-fs.h and libpq-fe.h are different files. The former is for large
objects support, the latter brings in ligpq client library API to client
programs.
Shortly, you need to use libpq-fe.h, but not anything other.
> Does anybody know why I am getting this error?
The problem is likely with incorrect PG_INC_DIR path.
I suppose you set it as follows:
C:\Program Files\PostgreSQL\8.1\include\libpq
but the correct path should read as:
C:\Program Files\PostgreSQL\8.1\include
> Does it have anything to do with the postgresql version?
I'm not aware of any such reason, about differences between versions.
In December/January I was building GDAL with PostgreSQL 8.1, 8.2 Beta
and 8.2 with success and taking the same steps.
Usually, from PgSQL version to version, the only different part of
default installation path is version number (X.Y), all other path
components are constant:
C:\Program Files\PostgreSQL\X.Y
ie.
C:\Program Files\PostgreSQL\8.1
C:\Program Files\PostgreSQL\8.2
Cheers
--
Mateusz Loskot
http://mateusz.loskot.net
More information about the Gdal-dev
mailing list