error C2894: templates cannot be declared to have 'C' linkage
2010-11-19 13:30
381 查看
方法:QTSS.hOSHeader.hws2tcpip.hwspiapi.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
在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
相关文章推荐
- error C2894: templates cannot be declared to have 'C' linkage
- error C2894: templates cannot be declared to have 'C' linkage
- u-boot移植时出现inline function 'coloured_LED_init' cannot be declared weak及相关错误时的解决办法!
- 创建SessionFactory出错Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set
- Optional int parameter 'page' is present but cannot be translated into a null value due to being dec
- How to avoid the error "The file 'xyz.mdf' cannot be overwritten. when deploying
- Android源码编译时遇到的问题:error:reference 'counts' cannot be declared 'mutable'
- u-boot移植时出现inline function 'coloured_LED_init' cannot be declared weak及相关错误时的解决办法!
- Pymongo - TypeError: index 'xxxx' cannot be applied to Cursor instances
- Swift中推送通知设置:Binary operator '|' cannot be applied to two UIUserNotificationType operands 错误解决
- warning C4251: 'm_ListInfo' : struct 'DuiLib::tagTListInfoUI' needs to have dll-interface to be used
- Swift Compiler Error Binary oprator '+' cannot be applied to operands of type 'UInt16' and 'UInt8'
- Android Studio 那些事| ' ' cannot be applied to '(groovy.lang.Closure)'
- [Hibernate]Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set
- 升级as后,老工程gradle文件出现"dependencies' cannot be applied to '(groovy.lang.Closure)'警告的解决办法
- Optional int parameter 'id' is present but cannot be translated into a null value due to being decla
- matlab错误:Warning: Variable 'a' cannot be saved to a MAT-file whose version is older than 7.3.
- 去除Warning C4251 “class 'std::vector<_Ty>' needs to have dll-interface to be used by clients of class
- 'AddressOf' expression cannot be converted to 'Long' because 'Long' is not a delegate type.解决办法
- Warning: Variable 'a' cannot be saved to a MAT-file whose version is older than 7.3.