Files
dl/build/ubuntu编译说明.txt
T
2026-09-16 14:07:40 +08:00

57 lines
2.8 KiB
Plaintext
Vendored
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
1.常见文件
新建文件:touch 1.txt
cmake设置多线程编译(0不会用满):Ctrl+, 然后设置 cmake.parallelJobs
使用clangd进行智能提示:安装后,cmake添加
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
然后 将 compile_commands.json拷贝到项目根目录
使用lldb调试:安装CodeLLDB插件,自动更新比较慢从github
libreOfficeOffice替代
GIMP:图像编辑
2.安装git
sudo apt install git
3.拉取仓库
git clone https://gitee.com/lveyou/dl.git
4.安装vscode
安装中文插件
安装cmake插件(CMake Tools
5.安装cmake、clang等
sudo apt install cmake
sudo apt install clang
# glfw
sudo apt install libwayland-dev libxkbcommon-dev xorg-dev
# curl
sudo apt install libcurl4-openssl-dev
# vulkan
sudo apt install libvulkan-dev vulkan-tools
# openal
sudo apt install libopenal-dev
---------------------------------------------------------------------
Wayland 和 X11 的依赖关系
默认情况下,Wayland 和 X11 后端均在 Linux 和其他类 Unix 系统(macOS 除外)上启用。要禁用其中一个或两个选项,请在生成构建文件时,在下一步设置 GLFW_BUILD_WAYLAND 或 GLFW_BUILD_X11 CMake 选项。
要为 Wayland 和 X11 编译 GLFW,需要安装 X11、Wayland 和 xkcommon 开发包。在某些系统上,还需要一些其他软件包。上述开发包中,没有一项是使用已编译的GLFW库来构建或运行程序的。
在 Debian 以及 Ubuntu 和 Linux Mint 等衍生产品上,你需要 libwayland-dev 而且 libxkbcommon-dev 用于 Wayland 和 the 的软件包 xorg-dev 用于 X11 的元包编译。这些将拉入所有其他依赖项。
sudo apt install libwayland-dev libxkcommon-dev xorg-dev
在Fedora和Red Hat等衍生产品上,您需要 wayland-devel 而且 libxkbcommon-devel 用于 Wayland 和 the 的软件包 libXcursor-devel, libXi-devel, libXinerama-devel 而且 libXrandr-devel 用于 X11 编译的软件包。这些将拉入所有其他依赖项。
sudo dnf install wayland-devel libxkbcommon-devel libXcursor-devel libXi-devel libXinerama-devel libXrandr-devel
在 FreeBSD 上,你需要 wayland, libxkbcommon 而且 evdev-proto 用于为 Wayland 编译的软件包。X11 头部安装在终端用户的 X11 包上,因此如果你的 X 服务器正在运行,则应该也具备这些头。如果不行,请安装 xorgproto 用于 X11 的编译包。
pkg install wayland libxkbcommon evdev-proto xorgproto
在Cygwin Wayland上不支持,但您需要 libXcursor-devel, libXi-devel, libXinerama-devel, libXrandr-devel 而且 libXrender-devel 用于 X11 编译的软件包。这些可以在 GUI 安装程序的 Libs 部分找到,并会拉入所有其他依赖项。
拥有所需的依赖项后,请继续使用 CMake 生成构建文件。
---------------------------------------------------------------------