< Previous by Date Date Index Next by Date >
  Thread Index Next in Thread >

[reSIProcate] C2894 build error with VS 2005


Hi,

I am new to this list and currently trying to build
resiprocate with VS 2005 Beta2.

The problem is when building "rutil" I receive the following
error:

C2894 templates cannot be declared to have 'C' linkage

The reason for this is that rutil includes ares in the 
following way:

extern "C"
{
#include "ares.h"
#include "ares_dns.h"
}


"ares.h" includes "Ws2tcpip.h" and this in turn includes
"wspiapi.h" which contains some template definitions 
which cause the error.


I was able to solve this problem in the following way:

- Move #include <Ws2tcpip.h> 
  from ares.h to ares_private.h

- Add the following IPV6 typedef to ares.h:

#ifndef s6_addr
    typedef struct in6_addr {
                union {
                        UCHAR       Byte[16];
                        USHORT      Word[8];
                } u;
        } IN6_ADDR;

        #define in_addr6 in6_addr

        #define _S6_un      u
        #define _S6_u8      Byte
        #define s6_addr     _S6_un._S6_u8
        #define s6_bytes    u.Byte
        #define s6_words    u.Word#endif

#endif


My question: Is this solution correct? Should I check
it back in? Will it be compatible with all other
platforms?
Shall I add the VS_8_0 solution and project files?


Thanks and best regards,

Matthias Moetje