[Gdal-dev] compile problem gdal 1.4 on windows with postgresql support

Dolf Andringa dolf.andringa at elcyion.nl
Thu Jan 18 11:42:31 EST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 
Ok, it was an error on my side :) I found the libpq-fs.h file and
assumed that should be the folder in the PG_INC_DIR, but it isn't. It
is the parent folder.
Using the following two lines, the compilation works:
PG_INC_DIR = "c:\Program Files\PostgreSQL\8.1\include"
PG_LIB = "c:\Program Files\PostgreSQL\8.1\lib\ms\libpq.lib" wsock32.lib
Thanks for the help Mateusz (and Frank through IRC).

Dolf.
Mateusz Loskot schreef:
> 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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
iD8DBQFFr6N24jCQQ91QiKgRAmBJAJ485ffBmIAoRp+u8112hbAWYrOHVACggoIp
w9VKRyzOI5UCz4RvHMxkpnc=
=og9K
-----END PGP SIGNATURE-----




More information about the Gdal-dev mailing list