cocos2d开发中的变态bug

//default context attributions are setted as follows
//GLContextAttrs GLView::_glContextAttrs = {5, 6, 5, 0, 16, 0};//�ӵ���Ĭ�ϲ�����stencil�����ģ��

GLContextAttrs GLView::_glContextAttrs = { 5, 6, 5, 0, 16, 8 };

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

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

最后导致

错误 31 error LNK2001: 无法解析的外部符号 "public: static struct GLContextAttrs cocos2d::GLView::_glContextAttrs" (?_glContextAttrs@GLView@cocos2d@@2UGLContextAttrs@@A) D:\svn_guaji\client\muguaji\frameworks\cocos2d-x\cocos\2d\CCGLView.obj libcocos2d

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

代码规范是完全没问题的

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


发布了52 篇原创文章 · 获赞 7 · 访问量 9万+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章