[sldev] [HELP] build error in MS platform SDK

Aidan Thornton makosoft at googlemail.com
Mon Nov 26 02:22:00 PST 2007


On 11/26/07, Stan Vernier <sv193702 at ohio.edu> wrote:
> Somewhere out of nowhere, I have ended up getting an error when the files
> llhttpassetstorage.cpp and llcurl.cpp are being compiled.  Both are giving the
> same error:
>
> c:\program files\microsoft platform sdk for windows server 2003
> r2\include\wspiapi.h(44) : error C2894: templates cannot be declared to have 'C'
> linkage
>
>
> The section of code that is throwing the error is:
>
> #if !defined(_WSPIAPI_COUNTOF)
> #if !defined(__cplusplus)
> #define _WSPIAPI_COUNTOF(_Array) (sizeof(_Array) / sizeof(_Array[0]))
> #else
> template <typename __CountofType, size_t _N>
>                        <--the line that throws the error
> char (&__wspiapi_countof_helper(__CountofType (&_Array)[_N]))[_N];
> #define _WSPIAPI_COUNTOF(_Array) sizeof(__wspiapi_countof_helper(_Array))
> #endif
> #endif
>
> Google has returned results of people having to add a IPV6 typedef, but it was
> rather vague and it worked fine as is for the last 6-7 weeks.
>
> I haven't modified anything in either file, and for that case not even the
> llmessage project.  Anyone has any idea what suddenly caused this or how to fix
> this?
>
> Thanks

Hi,

My best guess would be that there's an extern "c" around the include
that shouldn't be there. Since I don't have access to the SL code
right now, I have no idea where this might be.

Aidan.


More information about the SLDev mailing list