OpenGL安装
在MacOS上
得到Sample Code
OpenGL安装步骤:
- 检查在Terminal上已经安装
g++/clang++g++ -v - 安装Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - 安装cmake和GLFW
# CMake tool to compile brew install cmake # The Library GLFW brew install glfw
brew install pkg-config
OpenGL检查安装成功:
移动到CMakeList所在的文件夹,在命令行运行下面代码
# Generate the directory build/ mkdir build # Go to the build/ directory cd build # Run CMake cmake .. # A file Makefile should be generated # Compile make # Make sure the compilation succeed, a file pgm should be created # Go back to the root directory cd .. # Run the executable from the root directory # (possibly adapt to the name of your executable) build/sample_code
QtCreator安装
brew install qt brew install qt-creator
运行时候的问题及解决方案
在运行选项中找到Add build library search path to DYLD_LIBRARY_PATH and DYLD_FRAMEWORK_PATH,保证它没有被选中。
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/231879.html原文链接:https://javaforall.net
