[Gdal-dev] Java and the build environment

Andrea Aime aaime at openplans.org
Sun Apr 22 04:26:34 EDT 2007


Hi,
I've looked at the discussion about creating standard binaries
and about the supported enviroments under win32.

Let me add my 2 cents from the point of view of the java developer
that struggles making these c++ things work :-)

Building gdal and making the java bindings work was possible, for me,
only under Linux and Visual C++ 6.0. In both environments, build,
copy the resuling dll in the java library path, run, works. Aahh,nice!

I also tried with Microsoft Visual C++ Express 2005 + windows sdk + atl 
fixes I grabbed on a random internet page.
Gdal builds and all the gdal* apps, as well as the ogr* apps do work. 
Swig bindings to build. But for the life of me, I cannot make JNI load
the resulting libraries, it always complains about missing dependent
libraries. I tried using Dependency Walker to figure out the missing
ones and copied them right besides the gdal/ogr ones, and in the end
I was missing only the delay load library that makes up the Vista UI
(which of course I don't have on Windows) without luck, the error
was always the same.

On mingw I cannot even make gdal compile, I guess I need a "gdal+mingw 
for dummies" guide to try this road.

On cygwin, everything compiles (after taking _ages_, so slow that it's
basically unusable), but I don't see dll generated anywhere, the
swig java bindings do generate some .so.exe files... Are these things
usable only under a cygwin environemnt? Don't know, but if so, it's
unacceptable anyways.

So, long story short, the only full blown and licensed version of visual 
c++ I could put my hands upon was the vc 6.0 one (my old employer once
upon a time used it along with VB6), and that's the only one I could use
to make java bindings work for real.

If anyone has ideas on how to make vc++ 2005 or mingw work, I'm all 
ears, thought my response times will be limited by the fact that I have
to keep this on my (limited) spare time.
Both environments are in big need of a "howto" such as the VC++
one imho (http://trac.osgeo.org/gdal/wiki/BuildingOnWindows).

Cheers
Andrea



More information about the Gdal-dev mailing list