代码 :
#include "vxWorks.h"
#include
#include "TestDll.h"
class CTest
{
public:
CTest(){};
void print(){printf("CTest::print()\n");}
static char m_s;
};
static int i;
int main()
{
printf("CTest::static member %d88!\n", CTest::m_s);
return 0;
}
编译无问题,download时提示:
Errors while downloading E:/prj/Visession/NetVideo/shenzhen/src/vxworks/UseSampleDllPrj/SIMNTgnu/UseSampleDllPrj.out:
__5CTest$m_s
如果使用全局的静态变量,则无此问题。
INCLUDE_CTORS_DTORS我已经加了,怎么回事?
代码有误,需要加定义char CTest::m_s = 0;