OpenGL安装和QtCreator安装

OpenGL安装和QtCreator安装OpenGL 安装安装步骤 检查安装成功 在 MacOS 上得到 SampleCode 安装步骤 检查在 Terminal 上已经安装 g clang g v 安装 Homebrew bin bash c curl fsSLhttps raw githubuserco com Homebrew install HEAD install sh 安装 cmake 和 GLFW CMaketooltoc Th

在MacOS上

得到Sample Code

OpenGL安装步骤:

  1. 检查在Terminal上已经安装g++/clang++
    g++ -v 
  2. 安装Homebrew
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 
  3. 安装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

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号