码迷,mamicode.com
首页 > 系统相关 > 详细

ubuntu cocos2d-x glfw编译出错解决方案

时间:2015-07-29 00:32:05      阅读:945      评论:0      收藏:0      [点我收藏+]

标签:

lib/libcocos2d.a(CCGLViewImpl-desktop.cpp.o): In function `cocos2d::GLViewImpl::GLViewImpl()‘:
/home/vin/workspace/wechat/cocos2d/cocos/platform/desktop/CCGLViewImpl-desktop.cpp:287: undefined reference to `glfwSetErrorCallback‘
lib/libcocos2d.a(CCGLViewImpl-desktop.cpp.o): In function `cocos2d::GLViewImpl::initWithRect(std::string const&, cocos2d::Rect, float)‘:
/home/vin/workspace/wechat/cocos2d/cocos/platform/desktop/CCGLViewImpl-desktop.cpp:348: undefined reference to `glfwWindowHint‘
/home/vin/workspace/wechat/cocos2d/cocos/platform/desktop/CCGLViewImpl-desktop.cpp:349: undefined reference to `glfwWindowHint‘
/home/vin/workspace/wechat/cocos2d/cocos/platform/desktop/CCGLViewImpl-desktop.cpp:350: undefined reference to `glfwWindowHint‘
/home/vin/workspace/wechat/cocos2d/cocos/platform/desktop/CCGLViewImpl-desktop.cpp:351: undefined reference to `glfwWindowHint‘
/home/vin/workspace/wechat/cocos2d/cocos/platform/desktop/CCGLViewImpl-desktop.cpp:352: undefined reference to `glfwWindowHint‘
lib/libcocos2d.a(CCGLViewImpl-desktop.cpp.o):/home/vin/workspace/wechat/cocos2d/cocos/platform/desktop/CCGLViewImpl-desktop.cpp:353: more undefined references to `glfwWindowHint‘ follow
lib/libcocos2d.a(CCGLViewImpl-desktop.cpp.o): In function `cocos2d::GLViewImpl::initWithRect(std::string const&, cocos2d::Rect, float)‘:
/home/vin/workspace/wechat/cocos2d/cocos/platform/desktop/CCGLViewImpl-desktop.cpp:360: undefined reference to `glfwCreateWindow‘
/home/vin/workspace/wechat/cocos2d/cocos/platform/desktop/CCGLViewImpl-desktop.cpp:361: undefined reference to `glfwMakeContextCurrent‘
/home/vin/workspace/wechat/cocos2d/cocos/platform/desktop/CCGLViewImpl-desktop.cpp:364: undefined reference to `glfwSetCursorPosCallback‘
/home/vin/workspace/wechat/cocos2d/cocos/platform/desktop/CCGLViewImpl-desktop.cpp:365: undefined reference to `glfwSetScrollCallback‘
/home/vin/workspace/wechat/cocos2d/cocos/platform/desktop/CCGLViewImpl-desktop.cpp:368: undefined reference to `glfwSetWindowPosCallback‘
/home/vin/workspace/wechat/cocos2d/cocos/platform/desktop/CCGLViewImpl-desktop.cpp:369: undefined reference to `glfwSetFramebufferSizeCallback‘
/home/vin/workspace/wechat/cocos2d/cocos/platform/desktop/CCGLViewImpl-desktop.cpp:371: undefined reference to `glfwSetWindowIconifyCallback‘
lib/libcocos2d.a(CCGLViewImpl-desktop.cpp.o): In function `cocos2d::GLViewImpl::initWithFullScreen(std::string const&)‘:
/home/vin/workspace/wechat/cocos2d/cocos/platform/desktop/CCGLViewImpl-desktop.cpp:399: undefined reference to `glfwGetPrimaryMonitor‘
/home/vin/workspace/wechat/cocos2d/cocos/platform/desktop/CCGLViewImpl-desktop.cpp:403: undefined reference to `glfwGetVideoMode‘
lib/libcocos2d.a(CCGLViewImpl-desktop.cpp.o): In function `cocos2d::GLViewImpl::initWithFullscreen(std::string const&, GLFWvidmode const&, GLFWmonitor*)‘:
/home/vin/workspace/wechat/cocos2d/cocos/platform/desktop/CCGLViewImpl-desktop.cpp:415: undefined reference to `glfwWindowHint‘
/home/vin/workspace/wechat/cocos2d/cocos/platform/desktop/CCGLViewImpl-desktop.cpp:416: undefined reference to `glfwWindowHint‘
/home/vin/workspace/wechat/cocos2d/cocos/platform/desktop/CCGLViewImpl-desktop.cpp:417: undefined reference to `glfwWindowHint‘
/home/vin/workspace/wechat/cocos2d/cocos/platform/desktop/CCGLViewImpl-desktop.cpp:418: undefined reference to `glfwWindowHint‘
lib/libcocos2d.a(CCGLViewImpl-desktop.cpp.o): In function `cocos2d::GLViewImpl::end()‘:
/home/vin/workspace/wechat/cocos2d/cocos/platform/desktop/CCGLViewImpl-desktop.cpp:432: undefined reference to `glfwSetWindowShouldClose‘
lib/libcocos2d.a(CCGLViewImpl-desktop.cpp.o): In function `cocos2d::GLViewImpl::windowShouldClose()‘:
/home/vin/workspace/wechat/cocos2d/cocos/platform/desktop/CCGLViewImpl-desktop.cpp:448: undefined reference to `glfwWindowShouldClose‘
lib/libcocos2d.a(CCGLViewImpl-desktop.cpp.o): In function `cocos2d::GLViewImpl::setCursorVisible(bool)‘:
/home/vin/workspace/wechat/cocos2d/cocos/platform/desktop/CCGLViewImpl-desktop.cpp:486: undefined reference to `glfwSetInputMode‘
/home/vin/workspace/wechat/cocos2d/cocos/platform/desktop/CCGLViewImpl-desktop.cpp:488: undefined reference to `glfwSetInputMode‘
lib/libcocos2d.a(CCGLViewImpl-desktop.cpp.o): In function `cocos2d::GLViewImpl::updateFrameSize()‘:
/home/vin/workspace/wechat/cocos2d/cocos/platform/desktop/CCGLViewImpl-desktop.cpp:517: undefined reference to `glfwGetFramebufferSize‘
collect2: error: ld returned 1 exit status
make[2]: *** [bin/MyGame] Error 1
make[1]: *** [CMakeFiles/MyGame.dir/all] Error 2
make: *** [all] Error 2

 解决方案:

  just typing  "sudo apt-get purge libglfw2"
  and then execute the script "cocos2d-x/tools/travis-scripts/install_glfw.sh" and after that, I can build my "hello project" properly.

 

ubuntu cocos2d-x glfw编译出错解决方案

标签:

原文地址:http://www.cnblogs.com/weishuan/p/4684738.html

踩
(0)
赞
(0)
   
举报
评论 一句话评论(0)
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!