您的位置:首页 > 其它

error C2894: templates cannot be declared to have 'C' linkage

2010-11-19 13:30 381 查看
方法:QTSS.hOSHeader.hws2tcpip.hwspiapi.h
在QTSS.h中,使用了extern "C" 来包含头文件,结果造成这个错误。template只在c++中存在。 解决方法是注释掉QTSS.h 中的extern "C" { 和 }

在StreamingServer工程中,QTSSRTSPProtocol.h中也有extern "c" {…OSHeader.h…},同样去掉extern部分

#ifdef __cplusplus
extern "C"
{

#ifndef __cplusplus
}
#endif
#endif /* __cplusplus */

2、#ifndef __cplusplus
/* to fool automatic indention engines */
{

#endif
}
#endif

-------》

#ifdef __cplusplus
//extern "C"
//{

#ifndef __cplusplus
//}
#endif
#endif /* __cplusplus */

2、#ifndef __cplusplus
/* to fool automatic indention engines */
//{

#endif
//}
#endif
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐