在代码块

时间:2015-06-19 19:53:13

标签: cocos2d-x codeblocks

我正在尝试在代码块中构建基于cocos2-dx的项目。我使用的是Ubuntu 14.我收到了以下错误

  

GAME_DIR / SampleGame / cocos2d的/茯苓/平台/桌面/ CCGLViewImpl-desktop.cpp:287:   未明确引用glfwSetErrorCallback' GAME_DIR/SampleGame/cocos2d/cocos/platform/desktop/CCGLViewImpl-desktop.cpp:348: undefined reference to glfwWindowHint'   GAME_DIR / SampleGame / cocos2d的/茯苓/平台/桌面/ CCGLViewImpl-desktop.cpp:360:   未明确引用glfwCreateWindow' GAME_DIR/SampleGame/cocos2d/cocos/platform/desktop/CCGLViewImpl-desktop.cpp:361: undefined reference to glfwMakeContextCurrent'   GAME_DIR / SampleGame / cocos2d的/茯苓/平台/桌面/ CCGLViewImpl-desktop.cpp:364:   对glfwSetCursorPosCallback' GAME_DIR/SampleGame/cocos2d/cocos/platform/desktop/CCGLViewImpl-desktop.cpp:365: undefined reference to glfwSetScrollCallback'的未定义引用   GAME_DIR / SampleGame / cocos2d的/茯苓/平台/桌面/ CCGLViewImpl-desktop.cpp:368:   对glfwSetWindowPosCallback' GAME_DIR/SampleGame/cocos2d/cocos/platform/desktop/CCGLViewImpl-desktop.cpp:369: undefined reference to glfwSetFramebufferSizeCallback'的未定义引用   GAME_DIR / SampleGame / cocos2d的/茯苓/平台/桌面/ CCGLViewImpl-desktop.cpp:371:   未明确引用`glfwSetWindowIconifyCallback'

1 个答案:

答案 0 :(得分:0)

我得到了自己的问题的答案。

我将目标平台更改为Unix,之前设置为全部。然后我在cmake.txt中添加了我的类。然后我清理它和Build。这很有用。