[Gdal-dev] Unable to load PROJ.4 library in GDAL

Roger André randre at gmail.com
Thu May 3 18:01:47 EDT 2007


Hi Ari,

I tried using the dll from FWTools.  I installed the Windows version of
FWTools 1.2.2 and then found the proj_fw.dll file in the "bin/" dir.  I
first followed your instructions and tried using the set command:
set PROJSO=/cygdrive/c/FWTools1.2.2/bin/proj_fw.dll

This did not set the enviroment variable, but I went ahead and tested it and
got the same error as before.

I then edited the /etc/profile dir in Cygwin and added the following entry:
PROJSO=/cygdrive/c/FWTools1.2.2/bin/proj_fw.dll

After sourcing /etc/profile the environment variable appeared to be
correctly set.  I then tested the gdalwarp, and again got the same error.

I had a similar problem initially getting Python support in the gdal
compile.  This was resolved with Norman's help by setting the
"--with-python" configure option.  It seems like there is a definite "issue"
that requires static libraries to be built when using GDAL and PROJ in
Cygwin.  I'm totally fine with that, but I'm lost regarding how to set my
compile parameters.  My guess is that the workflow should go something like
this:

- Install Cygwin
- install PROJ from source and set flags to create PROJ libraries (if
needed)
- install GDAL from source and set flags to statically link to Python, PROJ,
POSTGIS, etc

If that's the case, then the question becomes how to determine what the
correct path is to those various libraries?  I know this is dependent on the
install location, but isn't there a default path?

Thanks,

Roger



On 5/3/07, Ari Jolma <ari.jolma at tkk.fi> wrote:
>
> Roger André kirjoitti:
> > I'm having problems with the GDAL installation I have running in
> > Cygwin on Windows XP.  It appears that GDAL is unable to find some of
> > the proj libraries that it needs.  I ran the following command:
> > gdalwarp -s_srs "EPSG:32651" -t_srs "EPSG:4326" input.tif output.tif
> >
> > it gave this error when it ran:
> >
> > ERROR 6: Unable to load PROJ.4 library (libproj.dll), creation of
> > OGRCoordinateTransformation failed.
> >
>
>
> Roger,
>
> If your proj4 DLL has another name use the command
>
> set PROJSO=<name of the proj4 DLL>
>
> in the DOS prompt (if that's appropriate in Cygwin) and add the
> directory in which the DLL is into the path. You can get pre-compiled
> proj4 DLL from several sources FWTools for example.
>
> Regards,
>
> Ari
>
>
> > I did a search and found posts saying that I should download and
> > install proj from source, then compile GDAL with static linking to
> > proj using the
> > "--with-static-proj4" configure flag.  I downloaded and installed
> > proj-4.5.0 from source yesterday, but am unsure what path to give the
> > "--with-static-proj" option.
> >
> > Can someone give me a few pointers about what I should look for?
> >
> > Thanks,
> >
> > Roger
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Gdal-dev mailing list
> > Gdal-dev at lists.maptools.org
> > http://lists.maptools.org/mailman/listinfo/gdal-dev
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20070503/7da7ae3a/attachment.html


More information about the Gdal-dev mailing list