[Gdal-dev] Re: OGR with Geos in Windows?
Frank Warmerdam
warmerdam at pobox.com
Fri Nov 26 11:33:28 EST 2004
Rodrigo Aceves wrote:
> Hi Frank,
>
> I've done as you suggested and it compiled OK, but when it comes to link
> there are a lot of warnings and errors. The errors are something like
> "function already defined in geos.lib" and at the end it says "library
> conflicts, use /NODEFULTLIB:library". The problem is with two libraries. But
> when I use de NODEFAULT there are more erros. This time the errors say
> "scanf not defined" or something like that.
>
> Let me explain what I did: I created an empty project in VC .NET and added
> all the files of GEOS and compiled, it worked after minor changes in the
> code. So it produced a geos.lib file.
>
> Then I use your suggestion and added geos.lib to the ADD_LIBS path. And put
> the headers diretory inside the ogr directory. I defined HAVE_GEOS and ran
> Nmake.
>
> That's when I get all this errors.
>
> Any idea?
Rodrigo,
You didn't compile GEOS with the same compiler options as GDAL is compiled with.
You likely need /MD instead of /MT or something like that. You can likely
fiddle about with your geos building project to fix this. If it were up to
me, i would just make up a quick makefile.vc and include the GDAL nmake.opt
for options, but then I am a bit of a throwback.
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