!!版权声明:本文为博主原创文章,版权归原文作者和博客园共有,谢绝任何形式的 转载!!

作者:mohist

mac osx : 10.14.6 Mojave.

  之前没有配置openGL相关开发环境,自己自行下载 nanogui的源码后, 打开cmake尝试编译并生成  nanogui 的example, 但是失败了 cmake提示如下:

提示原文:

CMake Error at CMakeLists.txt:15 (message):
The NanoGUI dependency repositories (GLFW, etc.) are missing! You probably
did not clone the project with --recursive. It is possible to recover by
calling "git submodule update --init --recursive"

  很困扰。 不知道怎么破。

  尝试在 Issue 中找到了答案。   点我    查看具体详情

----------> 核心代码 如下  <-----------

$ mkdir nanogui-test
$ cd nanogui-test
$ git init
$ git submodule add https://github.com/wjakob/nanogui.git lib/nanogui
$ git submodule update --init --recursive

  

  于是,自己打开终端,尝试执行上面的核心代码。 成功了。   上面的命令,我排序得到:

A、$ mkdir nanogui-test
B、$ cd nanogui-test
C、$ git init
D、$ git submodule add https://github.com/wjakob/nanogui.git lib/nanogui
E、$ git submodule update --init --recursive

  

   当我执行到  指令D 时, 提示失败了。

  于是自己再次执行出错的指令D。又成功了。

  指令D 成功后, 会修改 指令 A 创建的文件夹 。 再次来到 下载的文件,发现源码文件夹下的 ext 文件夹 已经 下载好了代码。 这与主动下载GitHub的nanogui源码是不一样, github源码的ext文件夹下是没有源码文件的。

再看文件夹

  于是, 自己便打开了  nanogui  的文档,按照给出的教程,成功 生成了 nano对应的example。  查看编译指令,

# enter the top-level NanoGUI directory
$ cd nanogui # make a build directory and enter that
$ mkdir build
$ cd build # generate your Makefile
$ cmake .. # now that you have a Makefile, use that to build
$ make -j 4

    这里, 截取 中间输出的部分结果:

-- The C compiler identification is AppleClang 11.0.0.11000033
-- The CXX compiler identification is AppleClang 11.0.0.11000033
-- 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
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Setting build type to 'Release' as none was specified.
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success ...... 省略....... /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/OpenGL.framework/Headers/gl3.h:1631:21: note:
'glClear' has been explicitly marked deprecated here
GLAPI void APIENTRY glClear (GLbitfield mask) OPENGL_DEPRECATED(10.5, 10.14);
^
9 warnings generated.
[ 97%] Linking CXX executable example2
[ 97%] Built target example2
42 warnings generated.
[ 98%] Linking CXX executable example1
14 warnings generated.
[100%] Linking CXX executable example3
[100%] Built target example3
[100%] Built target example1
[100%] Built target nanogui-python

  

   查看文件夹输出:

  

  于是, 自己尝试运行 生成的 结果, 发现与 nanogui 在 GitHub 上的 示例截图了;

-------完------

附:本次使用的源码下载地址: https://github.com/mohistH/nanogui_lib/releases/tag/1.0

mac osx 准备 nanogui 记录的更多相关文章

  1. Mac OSX系统中Hadoop / Hive 与 spark 的安装与配置 环境搭建 记录

    Mac OSX系统中Hadoop / Hive 与 spark 的安装与配置 环境搭建 记录     Hadoop 2.6 的安装与配置(伪分布式) 下载并解压缩 配置 .bash_profile : ...

  2. Mac OSX Sierra WiFi connecting problem

    吐槽一下,苹果的质量管控越来越差了. Mac OSX Sierra有时突然或升级后会遇到wifi不停重连连不上问题,现象为不停地连接wifi. 网上有人说删除 /Library/Preferences ...

  3. mac osx下django-admin.py出现的问题

    mac osx 下面用django-admin.py创建项目的时候,没创建成功出现django-admin.py编辑文件,这主要的原因是mac osx下面django-admin.py被重命名为dja ...

  4. mac osx 上面部署Django项目 apache+mysql+mod_wsgi

    1.安装Xcode command line tools 首先,编译mysql和Homebrew需要用到Xcode command line tools,所以首先安装command line tool ...

  5. Webstorm 10 for mac osx 注册机,序列号,kegen

    小菜最近get到mac体验机会,早就耳闻mac非常适合做开发,于是迫不及待的安装各种开发工具,不知不觉,轮到前端开发神器webstorm了,看了一下官网的价格,心拔凉拔凉的. 果断搜索注册机,搜到的结 ...

  6. Mac OSX网络诊断命令

    作者:Vamei 出处:http://www.cnblogs.com/vamei 欢迎转载,也请保留这段声明.谢谢! 下面是一些Mac OSX下常用的网络诊断命令.它们能帮助我们发现网络问题.文中提到 ...

  7. Mac OSX上的软件包管理工具,brew 即 Homebrew

    brew 即 Homebrew,是Mac OSX上的软件包管理工具,能在Mac中方便的安装软件或者卸载软件, 只需要一个命令, 非常方便. brew类似ubuntu系统下的apt-get的功能. 安装 ...

  8. Install Ansible on Mac OSX

    from: https://devopsu.com/guides/ansible-mac-osx.html and : https://devopsu.com/guides/ansible-post- ...

  9. 更新Mac OSX XCode后Git 不能使用提示Can't start Git: /usr/bin/git

    更新Mac OSX XCode后Git 不能使用提示Can't start Git: /usr/bin/git 解决办法: 终端运行 sudo xcodebuild -license 同意协议就好了.

随机推荐

  1. 自定义 Word 模板

    自定义 Word 模板 目录 必要设置 样式设置 标题样式 多级列表 封面 正文 引用目录 页码 页眉 图标 自定义模板保存 样式导入和导出 批量删除多余空白段落 必要设置 显示所有格式标记 选择&q ...

  2. 关于基因GO分析的DAVID简单使用

    利用DAVID简单的进行GO富集度分析(这里只做简单的分析,即看基因是否存在在GO的三个过程里面) 比如我们有一组要分析的基因:TRPV6    CXADR    PROM1    GRAMD2   ...

  3. Python文件复制shutil模块

    Python中shutil模块主要用于文件操作,如复制,属性判断等 1.copyfileobj,拷贝文件内容,将文件句柄赋给该方法 def copyfileobj(src, dst, length=1 ...

  4. bluetooth sig bluetooth asia-深圳之行

    18年5月30日深圳参见蓝牙展会 主要了解下面 使用蓝牙和区块链构建室内导航定位系统和去中心化的MESH网络 -- 核心是通过iBeacon 来广播数据,典型用例是手机对手机的使用蓝牙进行交互,业界称 ...

  5. Python中的随机采样和概率分布(二)

    在上一篇博文<Python中的随机采样和概率分布(一)>(链接:https://www.cnblogs.com/orion-orion/p/15647408.html)中,我们介绍了Pyt ...

  6. 巩固java第七天

    巩固内容: HTML 属性 属性是 HTML 元素提供的附加信息. HTML 属性 HTML 元素可以设置属性 属性可以在元素中添加附加信息 属性一般描述于开始标签 属性总是以名称/值对的形式出现,比 ...

  7. 3步!完成WordPress博客迁移与重新部署

    本文来自于轻量应用服务器征文活动的用户投稿,已获得作者(昵称nstar)授权发布. 由于现有的服务器已经到期,并且活动已经取消,续费一个月145元比较贵,于是参加了阿里云的活动购买一台轻量应用服务器. ...

  8. JavaScript小数、百分数的转换

    百分数转化为小数 function toPoint(percent){ var str=percent.replace("%",""); str= str/10 ...

  9. map和forEach的区别

    总结 forEach()可以做到的东西,map()也同样可以.反过来也是如此. map()会分配内存空间存储新数组并返回,forEach()不会返回数据. forEach()允许callback更改原 ...

  10. 转 Android中Activity的启动模式(LaunchMode)和使用场景

    转载请注明出处:http://blog.csdn.net/sinat_14849739/article/details/78072401本文出自Shawpoo的专栏我的简书:简书 一.为什么需要启动模 ...