__declspec(naked) __stdcall
场景:_declspec(naked) _stdcall ?解决办法
__declspec(naked) _stdcall ???
在VC2008中,的声明一个函数原型以及定义,如下
void __declspec(naked) _stdcall foo();
void __declspec(naked) _stdcall foo()
{
// 什么事都没有做
}
出现了错误提示:
error C2488: “foo”: “naked”只能应用到非成员函数定义
哪位能帮帮解释一下吗,非常感谢!!!
------解决方案--------------------
// C2488.cpp
// compile with: /c
// processor: x86
__declspec( naked ) void func(); // C2488 declaration, not definition
__declspec( naked ) void i; // C2488 i is not a function
__declspec( naked ) void func() {} // OK
------解决方案--------------------
error C2488: “foo”: “naked”只能应用到非成员函数定义
错误提示不是说的很明显了
------解决方案--------------------
// C2488.cpp
// compile with: /c
// processor: x86
__declspec( naked ) void func(); // C2488 declaration, not definition
__declspec( naked ) void i; // C2488 i is not a function
__declspec( naked ) void func() {} // OK
2楼回复怎么不见了?
------解决方案--------------------
就是呀。。。人家已经说的很清楚了呀。。
------解决方案--------------------
nake 要求的条件:
1。定义
2。非内联
3。非成员。
__declspec(naked) _stdcall ???
在VC2008中,的声明一个函数原型以及定义,如下
void __declspec(naked) _stdcall foo();
void __declspec(naked) _stdcall foo()
{
// 什么事都没有做
}
出现了错误提示:
error C2488: “foo”: “naked”只能应用到非成员函数定义
哪位能帮帮解释一下吗,非常感谢!!!
------解决方案--------------------
// C2488.cpp
// compile with: /c
// processor: x86
__declspec( naked ) void func(); // C2488 declaration, not definition
__declspec( naked ) void i; // C2488 i is not a function
__declspec( naked ) void func() {} // OK
------解决方案--------------------
error C2488: “foo”: “naked”只能应用到非成员函数定义
错误提示不是说的很明显了
------解决方案--------------------
// C2488.cpp
// compile with: /c
// processor: x86
__declspec( naked ) void func(); // C2488 declaration, not definition
__declspec( naked ) void i; // C2488 i is not a function
__declspec( naked ) void func() {} // OK
2楼回复怎么不见了?
------解决方案--------------------
就是呀。。。人家已经说的很清楚了呀。。
------解决方案--------------------
nake 要求的条件:
1。定义
2。非内联
3。非成员。