VS报错error LNK1120

来源:互联网 发布:js实现pdf在线阅读 编辑:程序博客网 时间:2024/05/17 06:10

错误    3    error LNK1120: 1 个无法解析的外部命令    D:\CodeEnvironment\game\PopStar3\proj.win32\Debug.win32\PopStar3.exe    1

这种错误一般是用了不存在的方法或变量。

这次遇到的是一个static变量,在.h中声明了,但cpp中没有初始化。

static变量要再.h声明后在.cpp中给该变量初始化。const rapidjson::Document* DbObjectRollName::s_docData = nullptr;


0 0
原创粉丝点击