在 MacOS 上透過二進位檔安裝 C++ 適用的 OR-工具
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
引言
本指南說明如何在 macOS 上安裝 C++ 的 OR-Tools。
這些指示或許也適用於其他 macOS 變體,
只是在符合下列需求條件的機器上測試:
- MacOS 13.0.1 (Ventura) Intel 64 位元 (x86_64)
- MacOS 13.0.1 (Ventura) M1 (arm64)
必要條件
以下各節說明安裝 OR-Tools 的先決條件。
您必須安裝 Xcode 指令列工具。如要這麼做,請開啟
終端機,位於 /Applications/Utilities/,請輸入:
xcode-select --install
按一下「安裝」,下載並安裝 Xcode 指令列工具。不需要
,。如果你的網路連線速度較慢,
這可能需要幾分鐘的時間。
確認您已成功安裝 Xcode 指令列工具:
xcode-select -p
畫面上會顯示下列訊息:
/Library/Developer/CommandLineTools
請按照下列步驟安裝 C++ 的 OR-Tools 程式庫:
下載並擷取系統的二進位檔發行版本:
驗證安裝狀態
如要測試 C++ 安裝情形,請開啟終端機視窗,然後前往
解壓縮二進位檔。接著,請輸入
以下指令:
make test
這會執行一系列的 OR-Tools 範例。如果所有範例都執行了
即可開始
開始使用 OR-Tools。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-08-22 (世界標準時間)。
[null,null,["上次更新時間:2024-08-22 (世界標準時間)。"],[],["To install OR-Tools for C++ on MacOS, first install Xcode Command Line Tools by running `xcode-select --install` in the terminal and verifying with `xcode-select -p`. Next, download and extract the OR-Tools binary distribution for either MacOS Intel or M1. Finally, validate the installation by navigating to the extracted directory in the terminal and running `make test`. Successful completion indicates OR-Tools is ready for use.\n"]]