Opened 11 years ago

Closed 11 years ago

#4083 closed defect (fixed)

[PATCH] PCIDSK SDK: compilation failure with MSVC 1310

Reported by: Even Rouault Owned by: warmerdam
Priority: normal Milestone:
Component: GDAL_Raster Version: svn-trunk
Severity: normal Keywords: PCIDSK
Cc:

Description

Detected by Tamas buildbots ( http://vbkto.dyndns.org:1280/sdk/build-output/vc7-20110511-4-00-32-08-vc7-dev.txt ) :

	cl /nologo /MD /EHsc /GR /Ox /DNDEBUG /W4 /wd4127 /wd4251 /wd4275 /wd4786 /wd4100 /wd4245 /wd4206 /wd4018 /wd4389 -IE:\builds\..\sdk\vc7\gdal-trunk\gdal\port -IE:\builds\..\sdk\vc7\gdal-trunk\gdal\ogr -IE:\builds\..\sdk\vc7\gdal-trunk\gdal\gcore  -IE:\builds\..\sdk\vc7\gdal-trunk\gdal\alg -IE:\builds\..\sdk\vc7\gdal-trunk\gdal\ogr\ogrsf_frmts  -DOGR_ENABLED  -Isdk -DPCIDSK_INTERNAL -DHAVE_LIBJPEG -I..\jpeg\libjpeg /c sdk\core\pcidsk_utils.cpp /Fosdk\core\pcidsk_utils.obj
pcidsk_utils.cpp
sdk\core\pcidsk_utils.cpp(622) : error C3861: 'vsnprintf': identifier not found, even with argument-dependent lookup
sdk\core\pcidsk_utils.cpp(635) : error C3861: 'vsnprintf': identifier not found, even with argument-dependent lookup
sdk\core\pcidsk_utils.cpp(637) : fatal error C1903: unable to recover from previous error(s); stopping compilation

Change History (3)

comment:1 by Even Rouault, 11 years ago

Summary: PCIDSK SDK: compilation failure with MSVC 1310[PATCH] PCIDSK SDK: compilation failure with MSVC 1310

Similarly to frmts/pcidsk/sdk/core/pcidskexception.cpp, the following should solve the compilation failure :

$ svn diff frmts/pcidsk/sdk/core/pcidsk_utils.cpp
Index: frmts/pcidsk/sdk/core/pcidsk_utils.cpp
===================================================================
--- frmts/pcidsk/sdk/core/pcidsk_utils.cpp	(révision 22367)
+++ frmts/pcidsk/sdk/core/pcidsk_utils.cpp	(copie de travail)
@@ -39,6 +39,10 @@
 
 using namespace PCIDSK;
 
+#if defined(_MSC_VER) && (_MSC_VER < 1500)
+#  define vsnprintf _vsnprintf
+#endif
+
 /************************************************************************/
 /*                         GetCurrentDateTime()                         */
 /************************************************************************/

comment:2 by warmerdam, 11 years ago

Patch applied in sandbox (r22392) and pulled into trunk (r22393).

comment:3 by warmerdam, 11 years ago

Keywords: PCIDSK added
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.