【c++】cannot declare member function *** to have static linkage [-fpermissive]
2014-01-12 18:19
986 查看
参考 http://jimmyleeee.blog.163.com/blog/static/9309618200749111539259/
2007-05-09 11:15:39| 分类: Linux | 标签:技术 |字号 订阅
test.cpp:285: cannot declare member function `static int
CTest::testEtrance(short unsigned int)' to have static linkage
错误的原因就是在实现的地方不需要static了, 只在声明的地方需要static
static int CTest::testEtrance(WORD wCaseNO)
{
}
static 是多余的, 把static删除就可以解决这样的编译错误.
编译错误: cannot declare member function
2007-05-09 11:15:39| 分类: Linux | 标签:技术 |字号 订阅test.cpp:285: cannot declare member function `static int
CTest::testEtrance(short unsigned int)' to have static linkage
错误的原因就是在实现的地方不需要static了, 只在声明的地方需要static
static int CTest::testEtrance(WORD wCaseNO)
{
}
static 是多余的, 把static删除就可以解决这样的编译错误.
相关文章推荐
- "Cannot declare member function ...to have static linkage"错误
- "Cannot declare member function ...to have static linkage"错误
- "Cannot declare member function ...to have static linkage"错误
- "Cannot declare member function ...to have static linkage"错误
- static成员"Cannot declare member function ...to have static linkage"错误
- Cannot declare member function ‘static int Foo::bar()’ to have static linkage
- "Cannot declare member function ...to have static linkage"错误
- Cannot declare member function ...to have static linkage"问题
- error"Cannot declare member function ...to have static linkage"
- 'static' can indeed be used in C++ to create a Static Member Function
- C++ error:static member function cannot have cv-qualifier
- 编写c++程序过程中出现的错误 annonymous type with no linkage used to declare variable
- C++ 成员函数指针的问题 pointer-to-member-function
- How do I declare and use a pointer to a class member function?
- C++对象模型——指向Member Function的指针 (Pointer-to-Member Functions)(第四章)
- reference to non-static member function must be called
- C Pointer-to-Function 与 C++ Pointer-to-MemberFunction 的区别
- error C2894: templates cannot be declared to have 'C' linkage
- How to declare and initialize a static const array as a class member?
- Question 20: Which allocator member function do standard containers use to acquire storage for their elements in C++?