Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.

Example for Scapix Language Bridge

On the fly code generation to bridge C++ to Java, Objective-C, Swift, Python, JavaScript (WebAssembly) and C#.

  1. Change your C++ code and build your project (bindings generated as part of the build).
  2. Call newly changed C++ code from Java, Objective-C, Swift, Python, JavaScript or C#.

Install

$ git clone https://github.com/scapix-com/example1

Build

  • Run one of the *.sh or *.cmd scripts to create and build library project (chatlib).
  • Open corresponding platform specific application project in ui folder (chat).

iOS

  • Run: xcode_ios_objc.sh
  • Open in Xcode: ui/ios/chat.xcworkspace

macOS

  • Run: xcode_mac_objc.sh
  • Open in Xcode: ui/macos/chat.xcworkspace

Android (on Windows, macOS or Linux)

Python

Mac:

$ brew install python3

$ ./xcode_mac_python.sh
$ cd ui/python
$ ./run.py

Xcode project: build/xcode_mac_python/chatlib.xcodeproj

Windows:

Install python3

> vs_python.cmd
> cd ui\python
> run.py

Visual Studio solution: build\vs_python\chatlib.sln

Linux:

$ sudo apt install python3-dev

$ ./default_python.sh
$ cd ui/python
$ ./run.py

Java

Mac:

$ brew cask install java

$ ./xcode_mac_java.sh

Xcode project: build/xcode_mac_java/chatlib.xcodeproj

Windows:

Install JDK

> vs_java.cmd

Visual Studio solution: build\vs_java\chatlib.sln

Linux:

$ sudo apt install default-jdk

$ ./xcode_mac_java.sh

JavaScript (Emscripten)

Install Emscripten SDK

$ ./emscripten.sh
$ cd ui/js
$ ./serve.sh

C#

> vs_cs.cmd

Open Visual Studio solution: build\vs_cs\ui\cs\chat.sln