ubuntu18.04安装glfw3
时间: 2023-09-11 13:12:44 浏览: 144
Ubuntu 18.04 安装Open3D C++版本
要在Ubuntu 18.04上安装glfw3,可以按照以下步骤进行操作:
1. 首先,解压源码文件包并进入其中:
```
cd glfw-3.3.8
```
2. 创建一个build文件夹,并进入其中:
```
mkdir build
cd build
```
3. 使用cmake配置编译选项,并指定安装路径和构建共享库:
```
cmake -D CMAKE_INSTALL_PREFIX=./install -D BUILD_SHARED_LIBS=ON ..
```
4. 如果提示缺少依赖项,可以使用以下命令安装所需的依赖项:
```
sudo apt-get install libx11-dev libxrander-dev libxinerama-dev libxcursor-dev libxi-dev doxygen
```
5. 然后执行make命令进行编译:
```
make
```
6. 最后,执行make install命令将头文件和库文件安装到build/install文件夹下:
```
make install
```
这样,你就成功安装了glfw3,并且头文件和库文件位于build/install文件夹下。
#### 引用[.reference_title]
- *1* [目的:ubuntu下编译GLFW库](https://blog.csdn.net/Alger_magic/article/details/128168157)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [ubuntu18.04下的glfw3的安装](https://blog.csdn.net/qq_34205932/article/details/107437263)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文