博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
GLFW编译
阅读量:4199 次
发布时间:2019-05-26

本文共 632 字,大约阅读时间需要 2 分钟。

简介

GLFW is a free, Open Source, multi-platform library for OpenGL, OpenGL ES and Vulkan application development. It provides a simple, platform-independent API for creating windows, contexts and surfaces, reading input, handling events, etc.

下载

https://github.com/glfw/glfw

git clone https://github.com/glfw/glfw.git

编译

  • linux直接编译,会报错误:
error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
error: ‘M_PI’ undeclared (first use in this function)

需要在 CMakeLists.txt 中添加

add_definitions(-std=gnu99)
  • 动态编译
cmake -DBUILD_SHARED_LIBS=ON .make

编译结果

./src/libglfw.so.3./src/libglfw.so./src/libglfw.so.3.4
  • 静态编译
cmake .make

转载地址:http://wwbli.baihongyu.com/

你可能感兴趣的文章
flex 滚动条问题
查看>>
软件开发管理中的博奕论
查看>>
计算机认证考试种类
查看>>
SQL in和exists 比较
查看>>
社会性网络服务(SNS)研究
查看>>
鼠标DarkField技术
查看>>
傻傻的我
查看>>
paypal 沙盒账号注册
查看>>
ebay 沙盒账号注册
查看>>
linux -8 Linux磁盘与文件系统的管理
查看>>
linux -8 Linux磁盘与文件系统的管理
查看>>
linux 9 -文件系统的压缩与打包 -dump
查看>>
PHP在变量前面加&是什么意思?
查看>>
ebay api - GetUserDisputes 函数
查看>>
ebay api GetMyMessages 函数
查看>>
wdlinux
查看>>
关于mysql升级到5.5报错问题
查看>>
magento - 通过storeid,分类id,天数(几天内)得到产品
查看>>
一个很不错的bash脚本编写教程,至少没接触过BASH的也能看懂!
查看>>
Redis和Memcache对比及选择
查看>>