Mac OS Oculus DK2环境试搭建

试着在Mac OS上搭建Oculus的编译环境,但是还是没有成功。

在基础编译的时候出现了两个错误

       #error <atomic> is not implemented
     ^
    :543:2: error: <atomic> is not implemented
    #error <atomic> is not implemented
     ^

即,Xcode的GCC4.2不支持X11

'oglplus/gl.hpp' file not found
         ^'oglplus/gl.hpp' file not found

#include <oglplus/gl.hpp>
#include <oglplus/gl.hpp>
         ^#include <oglplus/gl.hpp>

         ^

以及没有安装oglplus库

接着开始安装oglplus

./configure.py                                                                                                       23:23:00
-- The C compiler identification is AppleClang 7.0.2.7000181
-- The CXX compiler identification is AppleClang 7.0.2.7000181
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features         


'GL/glut.h' file not found

又缺少了OpenGL,只好再去重新下载官方的图形库 https://developer.apple.com/downloads/?q=graphics

问题1的解决方案:

export CC=/usr/local/Cellar/gcc/4.9.2/bin/gcc-4.9
export CXX=/usr/local/Cellar/gcc/4.9.2/bin/g++-4.9

关于我

Github: @phodal     微博:@phodal     知乎:@phodal    

微信公众号(Phodal)

围观我的Github Idea墙, 也许,你会遇到心仪的项目

QQ技术交流群: 321689806