[geos-devel] Building latest CVS HEAD with MSVC++ 8.0

Stefan Zschocke s.zschocke at infozoom.de
Thu Feb 23 03:16:30 EST 2006

I just downloaded geos yesterday and defined a new project in VS.Net
2003 with it.
I built the code as dll and kept the samples out. Then I defined a test
console program with the bigtest sample and linked to the dll. It worked
fine. But I don't know wether the compiled code behaves correctly in
runtime. I will test some more samples.
I didn't have problems with round-function. Is this a compile time or a
runtime issue?
Concerning compatibility with VS.Net 2003, I had to make a few changes
to platform.h (the vc version), and also a few changes to the header
files. These changes were made in order to have the classes exported
from the dll, so they can be used from other programs.
in the platform.h  header I added:
#define GEOSDLL_API __declspec(dllexport)
#define GEOSDLL_API __declspec(dllimport)

and in the class-headers I inserted the macro:
class GEOSDLL_API PrecisionModel { ..}; 
and so on with all public class declarations.

The dll project has the GEOSDLL_EXPORTS defined in the project-settings,
thus all classes are exported.
Client code which includes the headers draw them in as import-symbols.

In order to have these changes in the public Geos tree with the modified
class declarations one would just have define the GEOSDLL_API as empty
macro in the non-VS platform.h.

I can share my VC DLL-project and solution with the samples no problem,
but it only works with the mentioned macros in place.


-----Original Message-----
From: geos-devel-bounces at geos.refractions.net
[mailto:geos-devel-bounces at geos.refractions.net] On Behalf Of Charlie
Sent: Thursday, February 23, 2006 1:02 AM
To: GEOS Development List
Subject: Re: [geos-devel] Building latest CVS HEAD with MSVC++ 8.0

Hi Matuesz,

I was just offering to donate the Visual Studio C++ Solution files 
(i.e., the VC++ project files) that I have to GEOS.

That is a separate thing from fixing the round function, which stops 
VC++ from compiling GEOS whether you use Visual Studio, the Visual
Studio command line or nmake.

However, I gather the VC++ community doesn't use GEOS much though, since

there aren't any Visual Studio files or build scripts that GEOS provides

that work with VC++.


Mateusz Łoskot wrote:
> Charlie Savage wrote:
>> One thing to follow up on.  I realize there used to be VC++ solution

>> in the GEOS source tree.  However, it wasn't maintained and thus was 
>> removed a few months ago.
>> Is there any interest in having a working VC++ solution again?  I 
>> don't mind keeping it up to date since I do that locally anyways.
> I don't understand. Are you talking about round function issue?
> Does it mean you are asking if it's worth to keep GEOS compilable
> with VC++ ?
> If I'm following your point, should I understand that GEOS is 
> (usually) not compiled by the GEOS Community with VC++ at all?
> Cheers

More information about the geos-devel mailing list