[Gdal-dev] GEOS Microsoft Visual C++.NET Port Working

Frank Warmerdam fwarmerdam at gmail.com
Fri Dec 3 11:35:45 EST 2004


Folks,

Sorry for changing the thread topic.  I was worried that folks not 
interested in "gettimeofday" might miss this.  

I have commited a source/Makefile.vc and source/headers/geos/platform.h.vc 
that allow building GEOS with MSCV .NET at the commandline.  Just
cd into source, run VCVARS32.BAT (or whatever it is called for VS.NET)
and then "nmake /f makefile.vc". 

If you have an existing platform.h in headers/geos you will need to
remove it first, so it can be replaced by platform.h.vc.  It seemed
that the geos 2.1.0 tarball included a platform.h though I don't think
it is supposed to. 

I did make a few changes to include files.  Notably, I had to add
alternate declarations for all the class UID values to postfix them with
I64 instead of LL on MSVC.  

There was also the toVector() issue.  I tried changing the derived
classes to define it non-const, but then it didn't override the base
class method so derived classes were lacking an implementation of
the required base class method. 

So, instead, I changed the base class method to return a non-const
result so it matched the signature of all the derived class methods
that were overriding it. 

Currently I am just making a static geos.lib (and the one test
executable - the bigtest TestSweepLineSpeed.exe).   I didn't try
making a DLL as we would need to modify all the class definitions
so they are exported from the DLL.  That was a bit more than I
felt up to today, but I might go back and do it before including
GEOS in my FWTools builds. 

Finally, I haven't tried Norman's suggestion about getting a new
STL port and going at VC6 again, but I may yet do that.  I would
need to before I can include geos in FWTools since it is a purely
VC6 build. 

Please let me know if my changes have broken anything. 

PS. I have also committed a change to the GDAL makefiles so 
it is easy to include GEOS support on windows, and this seems to
working well.  

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the Gdal-dev mailing list