curl-library
Building curl on windows using visual studio 2005 - IDN support gives compilation error
Date: Fri, 16 Oct 2009 06:34:55 +0000
Hi,
I am trying to build libcurl on windows with libidn support.
I have curl-7.19.0 version of curl.
I have Idn-1.9.0
To enable IDN support, I have added /D "HAVE_LIBIDN"
/D "HAVE_TLD_H" /D "HAVE_IDNA_STRERROR" /D "HAVE_IDN_FREE_H"
/D "HAVE_IDN_FREE" in my preprocessor definitions.
I have given Include and lib path of libidn
When I compile in Lib Debug mode, I get compilation error saying
c:\libcurl\dependency\idn-1.9.0\include\ac-stdint.h(36) : error
C2632: 'int' followed by 'int' is illegal
c:\libcurl\dependency\idn-1.9.0\include\ac-stdint.h(36) : warning
C4091: 'typedef ' : ignored on left of '__w64 int' when no variable is
declared
url.c
c:\libcurl\dependency\idn-1.9.0\include\ac-stdint.h(36) : error
C2632: 'int' followed by 'int' is illegal
c:\libcurl\dependency\idn-1.9.0\include\ac-stdint.h(36) : warning
C4091: 'typedef ' : ignored on left of '__w64 int' when no variable is
declared
version.c
c:\libcurl\dependency\idn-1.9.0\include\ac-stdint.h(36) : error
C2632: 'int' followed by 'int' is illegal
c:\libcurl\dependency\idn-1.9.0\include\ac-stdint.h(36) : warning
C4091: 'typedef ' : ignored on left of '__w64 int' when no variable is
declared
Generating Code...
My ac-stdint.h file in idn header files looks like this
#ifndef _AC_STDINT_H
#define _AC_STDINT_H 1
#ifndef _GENERATED_STDINT_H
#define _GENERATED_STDINT_H
#define uint8_t unsigned char
#define uint16_t unsigned short
#define uint32_t unsigned int
#define int8_t signed char
#define int16_t signed short
#define int32_t signed int
#define gint16 int16_t
#ifdef _WIN64
typedef __int64 ssize_t;
#else
typedef _W64 int ssize_t;
#endif
#endif
#endif
in Libcurl config-win32.h there is a code that looks like this
#ifndef _SSIZE_T_DEFINED
#if (defined(__WATCOMC__) && (__WATCOMC__ >= 1240)) || defined(__POCC__) ||
\
defined(__MINGW32__)
#elif defined(_WIN64)
#define ssize_t __int64
#else
#define ssize_t int
#endif
#define _SSIZE_T_DEFINED
#endif
Here ssize_t is defined to be int and in libidn we try to do typedef _W64
int ssize_t;
this cannot happen together.
So please let me know if there is any workaround for this.
Thanks
Shivanand
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-10-16