FAQ

Android Studio: fails to rebuild bridge headers

If this happens, delete folder: <project>/.gradle/buildOutputCleanup. I am investigating this issue.

Build errors on Windows caused by 260 characters path limitation

For example, you may receive error The CXX compiler identification is unknown when building Python bridge on Windows. To fix this, enable Windows long path support available starting from Windows 10 version 1607 (released in July 2016):

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem]
"LongPathsEnabled"=dword:00000001

Python ImportError: generic_type: type “SomeDerivedClassName” referenced unknown base type “SomeBaseClassName”

For Python bridge, the order of headers passed to scapix_bridge_headers() matters: headers with base classes should come before headers with derived classes.

Which languages are supported?

Right now, you can access your C++ code from Java, Objective-C, Swift, Python and JavaScript. Support for more languages coming soon.

Which platforms are supported for development?

macOS, Windows x64, Linux x64 (Ubuntu 18.04 x64 or compatible).

Which IDEs are supported?

Any IDE with CMake support: Xcode, Android Studio, Visual Studio, etc.

How does it work?

In your CMakeLists.txt you register your C++ header file using scapix_bridge_headers(). This uses add_custom_command() to associate Scapix executable (supplied in bin/ folder for macOS, Windows x64, and Linux x64) with generated bridge source file and registers this file as dependent on your C++ header file. This way, every time your C++ header file changes, the build system automatically invokes Scapix executable to rebuild corresponding generated source file. Scapix executable parses C++ header and generates bridge code for other languages.