加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

cocos2d开发中的变态bug

发布时间:2020-12-14 17:00:29 所属栏目:百科 来源:网络整理
导读://default context attributions are setted as follows //GLContextAttrs GLView::_glContextAttrs = {5,6,5,16,0};//?????????????stencil???????? GLContextAttrs GLView::_glContextAttrs = { 5,8 }; 由于跨平台的原因,mac中编辑过的代码会在vs2013中出
//default context attributions are setted as follows
//GLContextAttrs GLView::_glContextAttrs = {5,6,5,16,0};//?????????????stencil????????

GLContextAttrs GLView::_glContextAttrs = { 5,8 };

由于跨平台的原因,mac中编辑过的代码会在vs2013中出现乱码,所以当注释中出现中文乱码的时候

直接影响到下面一句的编译

最后导致

错误 31 error LNK2001: 无法解析的外部符号 "public: static struct GLContextAttrs cocos2d::GLView::_glContextAttrs" (?_glContextAttrs@GLView@cocos2d@@2UGLContextAttrs@@A) D:svn_guajiclientmuguajiframeworkscocos2d-xcocos2dCCGLView.obj libcocos2d

这个问题花了好几个小时才发现是乱码导致的

代码规范是完全没问题的

把乱码删除掉,再次编译链接错误就不会在出现了

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读