compile error Gdal on .net SDK - iostream not found

Jacob Delfos jacob.delfos at MAUNSELL.COM
Thu Mar 10 16:24:46 PST 2005


Hi All,

Just to let you know it's fixed. Turns out my dll was fine, but I copied it to the right space (forgot gdal must sit in system directory).
So conclusion: gdal can be compiled with the free microsoft .net compiler, but it takes a lot of improvising, and you might not get past the stage of the dll (it did not compile any executables).
I had to enable the linker flag in the nmake.opt file:
LINKER_FLAGS = /NODEFAULTLIB:LIBC 

I also had to change a few filenames for the ecw plugin (NCSEcwU.lib -> NCSEcw.lib), comment out a line NCSErrors.h (#include <crtdbg.h>, which apparently is safe to get rid of), and remove the last bit in tiffio.h (where it tries to make use of iostream, istream and ostream, which are not supported by this .net version). So not very clean, but it does work.

regards,

Jacob




--------------------------------------------------------------------------------
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Jacob Delfos
Sent: 10 March 2005 16:33
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] compile error Gdal on .net SDK - iostream not found


Craig,

Thanks for the tip. Unfortunately it wasn't that simple. It seems in this .net version, there is no support at all for iostream. Apparently they got rid of it in .net 2005 (which I think is what I use).
I resorted to a last option, and commented those lines out. It did not complain about it.

I got lots of other errors, though. The free .net compiler misses some fundamental files (e.g. lib.exe), which means a lot of improvisation. In the end, it created a gdal12.dll file. Unfortunately, the mrsid support did not work (which was why I embarked on this in the first place). The rest did work.

regards,

Jacob


--------------------------------------------------------------------------------
From: Craig Miller [mailto:craig.miller at spatialminds.com] 
Sent: 10 March 2005 14:31
To: 'Jacob Delfos'
Subject: RE: [UMN_MAPSERVER-USERS] compile error Gdal on .net SDK - iostream not found


In .NET 2003 they removed all the old .h headers, so just remove the .h (e.g iostream.h becomes iostream) from the include files and add a "using namespace std;" in your source code.



Another option is to install an STL libraty like STLport which should still have support for old include files.



--Craig






--------------------------------------------------------------------------------

From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Jacob Delfos
Sent: Wednesday, March 09, 2005 10:02 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] compile error Gdal on .net SDK - iostream not found



Hi All,



I'm working really hard to try and get Gdal compiled on Windows XP, with the microsoft .net SDK and the platform SDK for windows XP. Bear in mind, I'm pretty ignorant in this.



I'm running into the following error:



libtiff\tiffio.h(499) : fatal error C1083: Cannot open include file: 'iostream': No such file or directory



I'm no expert in C++, but I thought iostream was pretty fundamental. I've googled the world, and all it left me was a headache. But I'm not giving up. Why is iostream missing? What can I do to get it? I've tried substituting with the Cygwin iostream.h (experts will probably crinch at this). Didn't work too well. Anybody have any ideas?



Regards,



Jacob







JACOB DELFOS
SPATIAL INFORMATION ANALYST
Maunsell Australia Pty Ltd
629 Newcastle Street, WA 6007
PO Box 81, WA 6902
Leederville 
Western Australia
ABN 20 093 846 925



Tel     + 61 8 9281 6185
Fax    + 61 8 9281 6297
jacob.delfos at maunsell.com


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20050311/ec1b1743/attachment.htm>


More information about the MapServer-users mailing list