Code Monkey home page Code Monkey logo

c_api_samples's Introduction

Prerequisites

  • cmake >= v3.2
  • python >= v3.5 (Win) >= v3.7 (OSX)
  • Visual Studio 2017 or newer (Win) XCode >= v10.2 (OSX)

Fetching the Lumin SDK

To be able to build any of the sample applications requires you to have a Lumin SDK, which contains the toolchain and the build system 'mabu' (Magic Builder). To download the Lumin SDK, go to the Creator Portal.

Getting a Developer Certificate

Go to the Creator Portal and navigate to Publish => Certificates and Click "Add New". A privatekey.zip will be downloaded but you also have to wait for the Status to be "Active" and a Download link will appear on the same row. Unzip the private key and put that and the .cert file from the Download link in the same directory. Set the environment variable MLCERT to point to the .cert file.

Building the Sample Apps

  1. If you installed these samples via Package Manager you can use the "Open Shell" button to get a shell that's good to go otherwise follow steps 2-4.
  2. cd /path/to/mlsdk
  3. If on linux / OSX: source envsetup.sh. If on Windows: envsetup.bat
  4. If on linux / OSX: export MLCERT=/path/to/cert_from_creator_portal. If on Windows: set MLCERT=/path/to/cert_from_creator_portal
  5. cd /mlsdk/<version>/samples/c_api/app_framework
  6. python3.5 get_deps.py Note: On OSX you may need python3.7 if you run into issues related to SSL/TLS.
  7. python3.5 build_external.py
  8. cd /mlsdk/<version>/samples/c_api/samples
  9. python3.5 build.py

Cross-Building Notes

The theory of development for Lumin SDK is that you can build and debug on host as well as on device. It provides enough headers and libraries for Lumin API development on all supported platforms (under include and lib). It also bundles a toolchain and C / C++ libraries for native development for the Magic Leap device (under lumin/).

Although host development is well-supported, Lumin SDK does not bundle host toolchains -- you are expected to install e.g. Visual Studio 2017 or 2019 for Windows and the Windows 8+ SDK or Xcode for macOS yourself. mabu will detect such tools in their expected installation locations.

Similarly, you should be able to use any reasonably cross-platform third-party code with mabu (the native build system) but we do not provide ready-made builds or ports of such code.

Running under Zero Iteration with The Lab

Follow the instructions at https://developer.magicleap.com/learn/guides/tools-zi-using-zi

  • Launch The Lab
  • Start Zero Iteration
  • Open the terminal window by selecting the '>_' icon at the bottom left of The Lab window.
  • cd BUILD/<spec>
  • Run the binary located here BUILD/<spec>/<binary>.

c_api_samples's People

Contributors

stevebu56 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

c_api_samples's Issues

Build fails for 'lumin' target

Building with python script works, builds are generated as advertised.

When building the samples manually, I tried
mabu simple-gl-app.mabu -t lumin
However we get the following error:
.../include\app_framework/resource_pool.inl:15:10: fatal error: 'assimp/Importer.hpp' file not found

Looking into the python, it uses the following target ml1_clang-8, which I guess is using a newer version of clang.

Is this expected? If so, can we get the documentation/other tools updated? Specifically, I'm building a native plugin for Unity and it must use the -t lumin target. It's been quite a few hours figuring out what was supposed to be happening

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.