[Gdal-dev] Compiling with VC++8

Charles F. I. Savage cfis at interserv.com
Tue Nov 8 16:25:34 EST 2005


Two minor changes are needed to compile gdal with VC++ 8 (ie., VC 2005).
The strstr method now returns either a char* or const char* depending
on the parameters sent to it.  See
http://msdn2.microsoft.com/en-us/library/z9da80kz.aspx for more info.

Patch is below, I'll apply unless someone says otherwise.

Charlie



cvs diff -u -- ogr\ogrsf_frmts\mitab\mitab_feature.cpp (in directory
C:\msys\src\gdal\)
Index: ogr/ogrsf_frmts/mitab/mitab_feature.cpp
===================================================================
RCS file:
/cvs/maptools/cvsroot/gdal/ogr/ogrsf_frmts/mitab/mitab_feature.cpp,v
retrieving revision 1.30
diff -u -r1.30 mitab_feature.cpp
--- ogr/ogrsf_frmts/mitab/mitab_feature.cpp	12 Oct 2005 19:19:32 -0000	1.30
+++ ogr/ogrsf_frmts/mitab/mitab_feature.cpp	8 Nov 2005 19:50:49 -0000
@@ -7549,12 +7549,12 @@
      if(pszPenName && strstr(pszPenName, "mapinfo-pen-") ||
         strstr(pszPenName, "ogr-pen-"))
      {
-        if((pszPenId = strstr(pszPenName, "mapinfo-pen-")))
+        if((pszPenId = (char*)strstr(pszPenName, "mapinfo-pen-")))
          {
              nPenId = atoi(pszPenId+12);
              SetPenPattern(nPenId);
          }
-        else if((pszPenId = strstr(pszPenName, "ogr-pen-")))
+        else if((pszPenId = (char*)strstr(pszPenName, "ogr-pen-")))
          {
              nPenId = atoi(pszPenId+8);
              if(nPenId == 0)

***** CVS exited normally with code 1 *****


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 2781 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.osgeo.org/pipermail/gdal-dev/attachments/20051108/89ec77db/smime.bin


More information about the Gdal-dev mailing list