RE: [reSIProcate] C2894 build error with VS 2005
Alan,
thanks very much for you reply!
> I think a more portable solution might be to have the ares headers
> themselves export their functions with extern "C" where appropriate.
> The inclusion of the windows header can be made in a location where
> we are in C++ scope.
ares itself is C, not C++, so there will never be a
C++ scope within ares. As a consequence it's not
possible to use extern "C" declaration, you could
only use extern declaration for the functions.
But as soon as the ares.h is included in C++ projects
the functions won't be recognized as extern "C" and
it (=rutil) won't link with ares.
> That will have a lower impact on the code and be 'more right' for
> 'more people'.
My initial solution does not require changing a single
line of code in rutil (and probably so with other
projects). What could be the impact to other
platforms? (the IPV6 declaration can be included
within the "#ifdef WIN32" block, to it won't affect
any other platform. Moving the "#include <WS2tcpip.h>"
from ares.h to ares_private.h does not affect non
Windows platforms as well because it will be in a
WIN323 block there, too.
Or do you have any other solution?
Are you interested in adding project_8_0.sln files
for VS2005? If you like I could submit these.
One more question: should I reply to messages in
this mailing list by replying to the poster and having
the mailing list as cc or should I send to the mailing
list only?
Best regards,
Matthias
> -----Original Message-----
> From: Alan Hawrylyshen [mailto:alan@xxxxxxxxxx]
> Sent: Samstag, 1. Oktober 2005 22:24
> To: Matthias Moetje
> Cc: resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> Subject: Re: [reSIProcate] C2894 build error with VS 2005
>
>
> I think a more portable solution might be to have the ares headers
> themselves export their functions with extern "C" where appropriate.
> The inclusion of the windows header can be made in a location where
> we are in C++ scope.
>
> That will have a lower impact on the code and be 'more right' for
> 'more people'.
>
> Thoughts? If you can get this to work, I'll check in the change.
>
> Thanks!
>
> Alan
>
>
>