error LNK2019: 无法解析的外部符号

1>MenuScene.obj : error LNK2019: 无法解析的外部符号 "public: static class PopupLayer * __cdecl PopupLayer::create(char const *)" (?create@PopupLayer@@SAPAV1@PBD@Z),该符号在函数 "private: void __thiscall MenuScene::popupLayer(void)" (?popupLayer@MenuScene@@AAEXXZ) 中被引用
1>MenuScene.obj : error LNK2019: 无法解析的外部符号 "public: void __thiscall PopupLayer::setTitle(char const *,int)" (?setTitle@PopupLayer@@QAEXPBDH@Z),该符号在函数 "private: void __thiscall MenuScene::popupLayer(void)" (?popupLayer@MenuScene@@AAEXXZ) 中被引用
1>MenuScene.obj : error LNK2019: 无法解析的外部符号 "public: void __thiscall PopupLayer::setContentText(char const *,int,int,int)" (?setContentText@PopupLayer@@QAEXPBDHHH@Z),该符号在函数 "private: void __thiscall MenuScene::popupLayer(void)" (?popupLayer@MenuScene@@AAEXXZ) 中被引用
1>MenuScene.obj : error LNK2019: 无法解析的外部符号 "private: void __thiscall MenuScene::quitButtonCallback(class cocos2d::Node *)" (?quitButtonCallback@MenuScene@@AAEXPAVNode@cocos2d@@@Z),该符号在函数 "private: void __thiscall MenuScene::popupLayer(void)" (?popupLayer@MenuScene@@AAEXXZ) 中被引用

1>PopupLayer.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) void __cdecl cocos2d::CCLog(char const *,...)" (__imp_?CCLog@cocos2d@@YAXPBDZZ),该符号在函数 "private: static bool __cdecl <lambda_90bd412bac3324b643a74f3883cc00c2>::<helper_func_cdecl>(class cocos2d::Touch *,class cocos2d::Event *)" (?<helper_func_cdecl>@<lambda_90bd412bac3324b643a74f3883cc00c2>@@CA_NPAVTouch@cocos2d@@PAVEvent@3@@Z) 中被引用

========== 全部重新生成:  成功 0 个,失败 1 个,跳过 0 个 ==========

解决方法:

  1. 遇到这种问题一般都是由于缺少相应的库文件

  2. 2

    右击项目,选择“属性”--“链接器”--“输入”--“附加依赖项”

    根据错误中的提示在下图右边的红色框内添加相应的lib文件

    error LNK2019: 无法解析的外部符号
    error LNK2019: 无法解析的外部符号
  3. 3

    再次编译运行即可避免此类错误产生

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值