Skip to content
bruce edited this page May 18, 2023 · 7 revisions

安装C++17编译器

windows

安装 Visual Studio 2022 最新版。

centos

  • 安装GCC 9.3
yum install epel-release
yum install centos-release-scl-rh
yum install devtoolset-9-gcc devtoolset-9-gcc-c++
# 若要在启动的时候就生效,可以放置到~/.bashrc之中即可
source /opt/rh/devtoolset-9/enable
  • 安装clang
yum install centos-release-scl-rh
yum install llvm-toolset-7.0-clang-devel llvm-toolset-7.0-clang-libs llvm-toolset-7.0-clang-tools-extra
# 若要在启动的时候就生效,可以放置到~/.bashrc之中即可
source /opt/rh/llvm-toolset-7.0/enable

mac osx

安装LLVM 9.0+版本:

MacOsX中Clang与LLVM版本对应关系 https://en.wikipedia.org/wiki/Xcode#Xcode_7.0_-

编译

  • 获取最新的premake5。点击下载对应平台的可执行程序,并把premake可执行文件放到premake5.lua同级目录。

  • windows

    premake5.exe vs2022
    # 打开visual studio编译
  • linux
    # 默认采用gcc编译,中括号表示可选项: clang
    ./premake5 gmake [--cc=clang]
    # 默认debug版本,中括号表示可选项: release版本
    make clean [config=release]
    make [config=release]
  • macosx
    # 推荐使用clang编译
    ./premake5 gmake --cc=clang
    # 默认debug版本,中括号表示可选项: release版本
    make clean [config=release]
    make [config=release]
Clone this wiki locally