nut799 / CppUniverse

A demo project that showcase how to use C++ to conquer the universe, with the help of Djinni and WebAssembly :)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CppUniverse

A demo project that showcase how to use C++ to conquer the universe, with the help of Djinni and WebAssembly :)

This demo implement exactly the same feature as JavaUniverse, but write the main logic in C++.

Dependencies

Due to GitHub file size limit, the libs directory is ignored, you can download it here, and extract it as libs.

CPP Project

  • ./run_djinni.sh
  • cd cpp_project
  • xcake make
  • open CppUniverse.xcodeproj

Android Project

  • ./run_djinni.sh
  • Just open the android_project folder in Android Studio.

iOS Project

  • ./run_djinni.sh
  • cd ios_project
  • xcake make
  • open CppUniverse.xcodeproj

Web Project

WIP...

Caveat

  • Add -DCMAKE_INSTALL_PREFIX=`pwd`/out to cmake command to specify install dir;
  • 'cpprest/http_client.h' file not found with <angled> include; use "quotes" instead problem solution;
  • Arithmetic on a pointer to an incomplete type 'cpp_universe::Window': add #include "window.hpp" to get the complete type info of cpp_universe::Window;
  • Extend djinni record to add utility method which is only used by one language;
  • Djinni record is immutable;
  • Building for Android:
    • openssl need use r15c;
    • boost 1.65.1 need r16;
    • can't use nfs shared folder;
    • find boost error;
    • 'BOOST_STDLIB' macro redefined;
    • no matching member function for call to 'expires_from_now';
  • Building for iOS:
    • find_package(Threads REQUIRED) fail, solution;

All changes on C++ REST SDK can be found there.

About

A demo project that showcase how to use C++ to conquer the universe, with the help of Djinni and WebAssembly :)

License:MIT License


Languages

Language:C++ 63.8%Language:Objective-C 20.9%Language:Java 7.8%Language:CoffeeScript 3.6%Language:Objective-C++ 1.5%Language:CMake 1.1%Language:Python 0.8%Language:Shell 0.5%