- The Modern C++ Challenge
- Marius Bancila
- 191字
- 2021-06-25 22:01:20
How to generate projects for Xcode
Several solutions in the last chapter utilize the libcurl library. For SSL support, this library needs to be linked with the OpenSSL library. Do the following to install OpenSSL:
- Download the library from https://www.openssl.org/.
- Unzip the archive and, in a terminal, go to its root directory.
- Build and install the library with the following commands (executed in this order):
./Configure darwin64-x86_64-cc shared enable-ec_nistp_64_gcc_128 no-ssl2 no-ssl3 no-comp --openssldir=/usr/local/ssl/macos-x86_64
make depend
sudo make install
Until std::optional and the filesystem library will be available with Xcode's Clang, you need to use Boost. Do the following to install and build the Boost libraries:
- Install Homebrew from https://brew.sh/.
- Run the following command to download and install Boost automatically.
brew install boost - After installation, the Boost library will be available at /usr/local/Cellar/boost/1.65.0.
In order to generate projects for Xcode from the sources you have to:
- Open a terminal and go to the build directory in the source code root directory.
- Execute the following CMake command:
cmake -G Xcode .. -DOPENSSL_ROOT_DIR=/usr/local/bin -DOPENSSL_INCLUDE_DIR=/usr/local/include/ -DBUILD_TESTING=OFF -DBUILD_CURL_EXE=OFF -DUSE_MANUAL=OFF -DBOOST_FILESYSTEM=ON -DBOOST_OPTIONAL=ON -DBOOST_INCLUDE_DIR=/usr/local/Cellar/boost/1.65.0 -DBOOST_LIB_DIR=/usr/local/Cellar/boost/1.65.0/lib - After completion, the Xcode project can be found at build/cppchallenger.xcodeproj.
推薦閱讀
- UI設計基礎培訓教程
- Mastering JavaScript Object-Oriented Programming
- 軟件架構設計:大型網站技術架構與業(yè)務架構融合之道
- MySQL 8從入門到精通(視頻教學版)
- Android Studio Essentials
- Effective Python Penetration Testing
- Angular應用程序開發(fā)指南
- Java程序設計與項目案例教程
- Mastering HTML5 Forms
- 超簡單:用Python讓Excel飛起來(實戰(zhàn)150例)
- Node.js實戰(zhàn):分布式系統(tǒng)中的后端服務開發(fā)
- ArcPy and ArcGIS(Second Edition)
- Java程序設計入門(第2版)
- Ionic3與CodePush初探:支持跨平臺與熱更新的App開發(fā)技術
- Python自動化運維:技術與最佳實踐