mac osx 准备 nanogui 记录
!!版权声明:本文为博主原创文章,版权归原文作者和博客园共有,谢绝任何形式的 转载!!
作者: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"
很困扰。 不知道怎么破。
----------> 核心代码 如下 <-----------
$ 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 记录的更多相关文章
- Mac OSX系统中Hadoop / Hive 与 spark 的安装与配置 环境搭建 记录
Mac OSX系统中Hadoop / Hive 与 spark 的安装与配置 环境搭建 记录 Hadoop 2.6 的安装与配置(伪分布式) 下载并解压缩 配置 .bash_profile : ...
- Mac OSX Sierra WiFi connecting problem
吐槽一下,苹果的质量管控越来越差了. Mac OSX Sierra有时突然或升级后会遇到wifi不停重连连不上问题,现象为不停地连接wifi. 网上有人说删除 /Library/Preferences ...
- mac osx下django-admin.py出现的问题
mac osx 下面用django-admin.py创建项目的时候,没创建成功出现django-admin.py编辑文件,这主要的原因是mac osx下面django-admin.py被重命名为dja ...
- mac osx 上面部署Django项目 apache+mysql+mod_wsgi
1.安装Xcode command line tools 首先,编译mysql和Homebrew需要用到Xcode command line tools,所以首先安装command line tool ...
- Webstorm 10 for mac osx 注册机,序列号,kegen
小菜最近get到mac体验机会,早就耳闻mac非常适合做开发,于是迫不及待的安装各种开发工具,不知不觉,轮到前端开发神器webstorm了,看了一下官网的价格,心拔凉拔凉的. 果断搜索注册机,搜到的结 ...
- Mac OSX网络诊断命令
作者:Vamei 出处:http://www.cnblogs.com/vamei 欢迎转载,也请保留这段声明.谢谢! 下面是一些Mac OSX下常用的网络诊断命令.它们能帮助我们发现网络问题.文中提到 ...
- Mac OSX上的软件包管理工具,brew 即 Homebrew
brew 即 Homebrew,是Mac OSX上的软件包管理工具,能在Mac中方便的安装软件或者卸载软件, 只需要一个命令, 非常方便. brew类似ubuntu系统下的apt-get的功能. 安装 ...
- Install Ansible on Mac OSX
from: https://devopsu.com/guides/ansible-mac-osx.html and : https://devopsu.com/guides/ansible-post- ...
- 更新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 同意协议就好了.
随机推荐
- R 语言实战-Part 3 笔记
R 语言实战(第二版) part 3 中级方法 -------------第8章 回归------------------ #概念:用一个或多个自变量(预测变量)来预测因变量(响应变量)的方法 #最常 ...
- [R] 如何在Linux命令行进行参数传入?
以前由于R命令行传参不友好,经常嵌套在其他程序语言(如Perl/Python)中来进行传参,但现在也陆续有一些方式来实现R的传参了,这里简单罗列下. 方法一 最传统的方法就是使用系统自带的comman ...
- 如何构建自己的KEGG数据库
本文转自Y叔公众号 自己KEGG数据库好处: 可重复性好 没网也可以进行分析 步骤 1 在KEGG官网找到自己物种的3字符缩写 2 加载Y叔获取kegg.db 的R包 1 ##安装Y叔的包 2 lib ...
- Scrapy框架延迟请求之Splash的使用
Splash是什么,用来做什么 Splash, 就是一个Javascript渲染服务.它是一个实现了HTTP API的轻量级浏览器,Splash是用Python实现的,同时使用Twisted和QT.T ...
- R语言与医学统计图形-【15】ggplot2几何对象之线图
ggplot2绘图系统--几何对象之线图 曲线:点连线.路径曲线.时间序列曲线.模型拟合曲线...... 直线:水平直线.垂直直线.斜线. 1.曲线 对象及其参数. #路径图 geom_path(ma ...
- 【Python小试】去除核酸特定长度的接头序列
输入 input.txt ATTCGATTATAAGCTCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATC ATTCGATTATAAGCACTGATCGATCGATCG ...
- LeetCode替换空格
LeetCode 替换空格 题目描述 请实现一个函数,把字符串 s 中的每个空格替换成"%20". 实例 1: 输入:s = "We are happy." 输 ...
- 在服务端应用中如何获得客户端 IP
如果有 x-forwarded-for 的请求头,则取其中的第一个 IP,否则取建立连接 socket 的 remoteAddr. 而 x-forwarded-for 基本已成为了基于 proxy 的 ...
- 了解 Linkerd Service Mesh 架构
从较高的层次上看,Linkerd 由一个控制平面(control plane) 和一个 数据平面(data plane) 组成. 控制平面是一组服务,提供对 Linkerd 整体的控制. 数据平面由在 ...
- Shell学习(二)——变量和基本数据类型
参考博客: [1]LinuxShell脚本--变量和数据类型 [2]shell只读变量删除 一.变量 定义变量的语法 定义变量时,变量名和变量值之间使用"="分隔,并且等号两边不能 ...