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

作者: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. 有限元边界 Dirichlet 条件处理

    参考自百度文档,这里只考虑 Dirichlet 边界条件情况. 有限元法基本方法就是是构造线性方程组 \[\begin{equation} Au = f \end{equation}\] 进行求解.其 ...

  2. Docker Alpine Dockerfile 安装nginx,最小镜像

    Docker Alpine Dockerfile 安装nginx,最小镜像 FROM alpine MAINTAINER will ## 将alpine-linux:apk的安装源改为国内镜像 RUN ...

  3. Can't connect to HTTPS URL because the SSL module is not available. - skipping

    今天用pip3安装第三方库的时候报了这样一个错: Can't connect to HTTPS URL because the SSL module is not available. - skipp ...

  4. linux 常用查看命令

    linux 常用查看命令 目录 linux 常用查看命令 linux 查看内存/进程-ps/top linux 查看磁盘存储-df linux 查看io读写-iotop linux 查看端口占用-ne ...

  5. A Child's History of England.37

    Many other noblemen repeating and supporting this when it was once uttered, Stephen and young Planta ...

  6. day30线程(Threads)

    day30线程(Threads) 1.开启线程 一.什么是线程: 1.进程是资源分配的最小单位,线程是CPU调度的最小单位.每一个进程中至少有一个线程. 2.主进程中的线程称为主线程,其他开启的线程称 ...

  7. Flink(三)【核心编程】

    目录 一.Environment 二.Source 从集合读取数据 从文件读取数据 从kakfa读取数据(常用) 自定义数据源 三.Transform map Rich版本函数 flatMap key ...

  8. VIM多标签页

    :tabnew 增加一个标签 :tabc       关闭当前的tab :tabo       关闭所有其他的tab :tabp 或gT 前一个 :tabn 或gt  后一个 :tabs     显示 ...

  9. display:inline-block,block,inline元素的区别

    1.display:block将元素显示为块级元素,从而可以更好地操控元素的宽高,以及内外边距,每一个块级元素都是从新的一行开始.2.display : inline将元素显示为行内元素,高度,行高以 ...

  10. 使用MySQL的SELECT INTO OUTFILE ,Load data file,Mysql 大量数据快速导入导出

    使用MySQL的SELECT INTO OUTFILE .Load data file LOAD DATA INFILE语句从一个文本文件中以很高的速度读入一个表中.当用户一前一后地使用SELECT ...