hellik
February 12, 2011, 8:04pm
1
-----Ursprüngliche Nachricht-----
Von: "Helmut Kudrnovsky" <hellik@web.de>
Gesendet: 12.02.2011 19:29:49
An: grass-dev@lists.osgeo.org
Betreff: compiling in osgeo4w - configure: error: *** Unable to locate zlib library.
On Sat, 12. Feb 2011 at 19:05:31 +0100, Helmut Kudrnovsky wrote:
c:/OSGeo4W/include/io.h:41: error: redefinition of typedef 'intptr_t'
Where is that io.h from? I don't have one - so it's probably not from
osgeo4w.
if i comment out line 112-114 of cpl_config.h:
/* VC6 doesn't known intptr_t */
#if (_MSC_VER <= 1200)
typedef int intptr_t;
#endif
compiling is starting.
for comparison the related in io.h:
#ifndef _INTPTR_T_DEFINED
#define _INTPTR_T_DEFINED
#ifdef _WIN64
typedef __int64 intptr_t;
#else
typedef int intptr_t;
#endif
#endif
best regards
Helmut
___________________________________________________________
Empfehlen Sie WEB.DE DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.web.de
jef
February 12, 2011, 9:11pm
2
Hi Helmut,
On Sat, 12. Feb 2011 at 21:04:31 +0100, Helmut Kudrnovsky wrote:
if i comment out line 112-114 of cpl_config.h:
/* VC6 doesn't known intptr_t */
#if (_MSC_VER <= 1200)
I suppose that should read
#if defined(_MSC_VER) && (_MSC_VER <= 1200)
to work with MinGW. Does the following patch work for you?
I'm unsure about the second hunk.
Index: cpl_config.h
--- cpl_config.h (revision 21697)
+++ cpl_config.h (working copy)
@@ -14,7 +14,7 @@
#define HAVE_VPRINTF 1
#define HAVE_VSNPRINTF 1
#define HAVE_SNPRINTF 1
-#if (_MSC_VER < 1500)
+#if defined(_MSC_VER) && (_MSC_VER < 1500)
# define vsnprintf _vsnprintf
#endif
#define snprintf _snprintf
@@ -100,7 +100,7 @@
#define lfind _lfind
-#if (_MSC_VER < 1310)
+#if defined(_MSC_VER) && (_MSC_VER < 1310)
# define VSI_STAT64 _stat
# define VSI_STAT64_T _stat
#else
@@ -109,7 +109,7 @@
#endif
/* VC6 doesn't known intptr_t */
-#if (_MSC_VER <= 1200)
+#if defined(_MSC_VER) && (_MSC_VER <= 1200)
typedef int intptr_t;
#endif
Jürgen
--
Jürgen E. Fischer norBIT GmbH Tel. +49-4931-918175-20
Dipl.-Inf. (FH) Rheinstraße 13 Fax. +49-4931-918175-50
Software Engineer D-26506 Norden http://www.norbit.de
--
norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH
Rheinstrasse 13, 26506 Norden
GF: Jelto Buurman, HR: Amtsgericht Emden, HRB 5502