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

Stan Vernier sv193702 at ohio.edu
Sun Nov 25 20:46:28 PST 2007


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


More information about the SLDev mailing list