[geos-devel] help compiling windows library

Riccardo Cohen r.cohen at realty-property.com
Fri Nov 22 07:47:01 PST 2013


Hi again.

What I've done is removing the line :

	if exist $(LIBNAME) del $(LIBNAME)

Then it compiled the lib. And I had to run the command several times to 
have all compiled.... I really hate nmake :) even with /I...

I used the latest snapshot to be sure to have everything. I had to add 
the following lines in src/makefile.vc :

   triangulate\VoronoiDiagramBuilder.$(EXT) \
   geom\util\LinearComponentExtracter.$(EXT) \
   geom\util\PointExtracter.$(EXT) \
   geom\util\PolygonExtracter.$(EXT)

(I did not submit patch since I have no geos account)

I suggest also changing the help about debug flag: it is BUILD_DEBUG=YES 
and not DEBUG=1

Then I put the geostest.c in a small console application and compiled it 
properly and ran it ok.

I prefer to link statically and not use dlls. I recompiled the library 
with Debug Multithread (/MTd) instead of /MDd and the test ran 
correctly. (I had to comment the vld usage also)


Now some questions arise :

1) is it normal that the geos.lib is 45Mb ? Looks like really huge.

2) I found no tutorial on geos site
. I found one here 
https://docs.djangoproject.com/en/dev/ref/contrib/gis/geos/ but it is 
mainly python I think, and I'm using C++... I'm a bit lost with this.

My first step would be to cut a polygon into 2 pieces with a polyline, 
but I can't even find how to create a new Polygon objet. I've used 
NetTopologySuite that is related to JTS for .Net but it does not help me 
for C++


Thanks for your help.



On 22/11/13 10:31, Mateusz Loskot wrote:
> On 22 November 2013 07:06, Riccardo Cohen <r.cohen at realty-property.com> wrote:
>> All compilation went all right, only linking seems to fail. Is there any
>> additional option to set in nmake command to show more errors and line
>> numbers, I could not find any (I'm not using nmake very often).
>
> I guess, the NMAKE makefiles need to be updated by adding one of recently
> added .cpp files to http://svn.osgeo.org/geos/trunk/src/Makefile.vc
>
> If linker fails, then there must be name of "unresolved external symbol"
> included in the error message.
> This will give you clues what class/function may be missing,
> search for it in the GEOS sources tree, check if corresponding
> .cpp is in the makefile, add it if it isn't.
>
> That's usually my take on this kind of problems with NMAKE.
>
> p.s. Once you apply necessary update to makefile.vc,
> please submit patch to http://trac.osgeo.org/geos/
>
> Best regards,
>

-- 
Riccardo Cohen
+33 (0)6 09 83 64 49
Société Realty-Property.com
16 rue de Belle Isle
37100 Tours
France

<http://www.appartement-maison.fr>


More information about the geos-devel mailing list