JosephYao / swift-cpp-example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This repo is an example about how swift can call cpp code. It also includes the build of a cpp lib for iOS with cmake.

  1. Build cpp lib for iOS
cd cpp
mkdir build
cd build
cmake .. -G Xcode -DCMAKE_TOOLCHAIN_FILE=../../ios.toolchain.cmake -DPLATFORM=SIMULATOR64 -DDEPLOYMENT_TARGET=13.0
cmake --build . --config Debug
  1. After build cpp lib, you can run the iOS app and play with it.

About


Languages

Language:CMake 60.2%Language:Swift 13.6%Language:Ruby 10.8%Language:Objective-C++ 6.2%Language:C++ 6.1%Language:Objective-C 2.5%Language:C 0.7%