[Gdal-dev] RE: Problem compiling under VS.NET

Thom DeCarlo t.r.decarlo at larc.nasa.gov
Wed Nov 24 12:10:25 EST 2004


Hi,
Todd Jellett reminded me of the need to add std:: to istream and ostream.
This fixed the compile problem in frmts/gtiff.

However, there is still a missing include in frmts/vrt/makefile.vc. In order
to pick up the gdalwarper.h include file I needed to change the EXTRAFLAGS
variable definition to read:

EXTRAFLAGS = 	-I..\raw -I..\..\alg

Thom

--
Thom DeCarlo
-------------------------------------------------------
Nothing is sadder than the murder of a beautiful theory
             by a gang of ugly facts.

> -----Original Message-----
> From: Thom DeCarlo
> Sent: Wednesday, November 24, 2004 11:21 AM
> To: 'gdal-dev'
> Subject: [Gdal-dev] RE: Problem compiling under VS.NET
> 
> Hello Frank, I hope you're still on the list. ;-)
> 
> This raised a couple of new questions. First, if I install the latest
> tarball of libtiff and change the appropriate section of the nmake.opt
> file, will all this compile under VS.NET?
> 
> Second, where can I find the latest libtiff tarball? I went to the
> libtiff.org website and it seems to have become an advertising site. At
> the
> bottom of the page I found a link to the old libtiff.org webpage, but it
> doesn't have a pointer to any tarballs. It does give instructions for CVS
> access, but my company firewall does not allow CVS connections.
> 
> I tried to build using last night's gdal tarball and found that I'm still
> hitting the same problem in frmts/gtiff after changing the tiffio.h to
> include iostream instead of iostream.h.
> 
>     C:\SVS_DE~1\GDAL-C~3\frmts>cd gtiff   && nmake /NOLOGO /f makefile.vc
>       && cd ..
>     cl /nologo /Ox /MD /GX -I..\..\port -I..\..\ogr -I..\..\gcore -
> Ilibtiff
>       -Ilibgeotiff /c geotiff.cpp
>     geotiff.cpp
>     libtiff\tiffio.h(499) : error C2061: syntax error : identifier
> 'ostream'
>     libtiff\tiffio.h(500) : error C2061: syntax error : identifier
> 'istream'
>     NMAKE : fatal error U1077: 'cl' : return code '0x2'
>     Stop.
> 
> 
> Thanks,
> Thom
> 
> --
> Thom DeCarlo
> ---------------------------------------------------------
>   Given sufficient time and money, all things are possible.
> In lieu of time and money, caffeine and aspirin may also work.
> 
> > -----Original Message-----
> > From: Frank Warmerdam
> > Sent: Monday, November 22, 2004 11:31 PM
> > To: Thom DeCarlo; gdal-dev
> > Subject: Re: Problem compiling under VS.NET
> >
> > Thom DeCarlo wrote:
> > > Tried that. I've recently "upgraded" from VS6 to VS.NET and this might
> > > be the first time I've tried to recompile gdal using the new compiler.
> >
> > Thom,
> >
> > I'm afraid that gdal 1.2.5 has gone out with the same problem.
> >
> > > It looks like I don't have a full installation of the compiler. The
> old
> > > iostream libraries and headers (iostream.h, fstream.h, strstream.h,
> > > etc.) don't exist anywhere in my computer. The new, ANSI Standard
> > > headers (without the .h extension) are in the Vc7/include directory.
> > > But, of course, it's not as easy as simply removing the ".h" from the
> > > #include line. The compiler then complains about:
> > >    C++ exception handler used, but unwind semantics are not enabled.
> > >  Specify /EHsc
> >
> > The first step is to change iostream.h to iostream.  Andrey has fixed
> this
> > in the upstream libtiff, but once I again I failed to update GDAL with
> the
> > very latest libtiff fixes.
> >
> > The second step is to ensure that the appropriate build switches are in
> > use.
> > In VC6 the /GX switch is needed for proper C++ unwind semantics, and I
> > have (post 1.2.5 release) added this to the default nmake.opt file that
> is
> > distributed. I did a build with VC7 this morning and I didn't notice the
> > problems you are encountering, but then I also didn't update from CVS
> > except in the OCI driver where I was working.  The gist of it is though
> > that it shouldn't take much to get things working under VC7 at your end
> > since I do use that on one of my XP boxes.
> >
> > Sorry for missing this and thus distributed 1.2.5 with some VC7 build
> > bugs.
> >
> > 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