Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Patch - Compilation error C2894 when compiling VPCDetect.cpp with MSVS2005 (VC++ 8.0)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch - Compilation error C2894 when compiling VPCDetect.cpp with MSVS2005 (VC++ 8.0)



Hi Marc,
This patch is against mDNSResponder-107.6.tar.gz. I got it off the apple site today.

On 9/19/06, Marc Krochmal < email@hidden> wrote:
Hey Pavel,

Could you try all this again using mDNSResponder-107.6 .

<http://www.opensource.apple.com/darwinsource/tarballs/other/mDNSResponder-107.6.tar.gz
>

Like I said yesterday, mDNSResponder-108 is a Mac OS X specific
release that probably doesn't compile on other platforms.

Thanks.
-Marc



On Sep 19, 2006, at 4:47 PM, Pavel Repin wrote:

>
>
> On 7/21/06, Scott Herscher < email@hidden> wrote:
> Hey there Shao.  I don't have MS Visual Studio 8 in front of me, but
> you can try this:  Put "#define WSPIAPI_COUNTOF(_Array)
> (sizeof(_Array) / sizeof(_Array[0]))" on line 235, before #include <
> windows.h>.   Don't include the quotes.  Let me know if that fixes
> the problem.
>
> Thanks,
>
> Scott
>
> On Jul 18, 2006, at 1:30 PM, Shao Miller wrote:
>
>
> Good day everyone,
>
>     Earlier I was asking about about the possibility for Wide-Area
> Bonjour on a private intranet.  No-one responded but I found a
> solution to my problem and thought I'd share it here.  It turned out
> to be really quite simple.  I changed the function IsPrivateV4Addr()
> in mDNSCore/DNSCommon.c to always return mDNSfalse.  In this way,
> mDNSResponder no longer filters out private addresses, such as a
> private intranet uses.  It's great fun.
>
>     Going over to the Windows side, I tried to compile mDNSResponder
> in MS Visual Studio 8.  The compiler is of course strict about
> templates...  I got the error:
>
> c:\program files\microsoft visual studio 8\vc\platformsdk\include
> \wspiapi.h(44) : error C2894: templates cannot be declared to have
> 'C' linkage
>
>     So I went into the properties for the mDNSResponder project,
> chose [ Configuration Properties -> C/C++ -> Advanced ], changed
> "Show Includes" to "Yes".  This allowed me to follow the trail of
> includes to find the problem.  The problem is that in the file
> CommonServices.h, on line 46 we begin an extern "C" block which
> contains several includes.  On line 237 we include Ws2tcpip.h, which
> then includes wspiapi.h, which has a template declaration.
> Therefore we have a template declaration within an extern "C" block,
> which the compiler won't allow.  Oh, I am working with
> mDNSResponder-108 engineering version.
>
>     Does anyone have any advice for a workaround?
>
> - Shao Miller
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Bonjour-dev mailing list      (
>
> This email sent to email@hidden
>
>
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> <VPCDetect-C2894-error.patch.txt>
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Bonjour-dev mailing list      (
>
> This email sent to email@hidden




--
Pavel Repin
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Bonjour-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Patch - Compilation error C2894 when compiling VPCDetect.cpp with MSVS2005 (VC++ 8.0) (From: "Pavel Repin" <email@hidden>)
 >Re: Patch - Compilation error C2894 when compiling VPCDetect.cpp with MSVS2005 (VC++ 8.0) (From: Marc Krochmal <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.