Example C++ shared library loaded in LuaJIT through FFI
Switch branches/tags
Nothing to show
Clone or download
Latest commit dd083d6 May 15, 2016
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Ignore gnu global files May 14, 2016
Makefile Split up examples May 15, 2016
README.md Fixes readme May 12, 2016
add.cpp Adds first example May 15, 2016
add.lua Adds first example May 15, 2016
first.cpp Makes Linux compatible May 14, 2016
first.lua Simpler example May 14, 2016
foo.cpp Removes free_ptr May 15, 2016
foo.h Initial commit May 12, 2016
foo.lua Removes free_ptr May 15, 2016
person.cpp Split up examples May 15, 2016
person.lua Split up examples May 15, 2016

README.md

Loading a shared C++ library from LuaJIT through FFI

This repository contains the code for a tutorial on using LuaJIT's FFI to load a shared library. The shared library here is written in C++, so we need to do some tricks to get it working.

Building the examples

Type make, optionally using make -e to use environment variables to override Makefile variables.

Author and license

The code in this repository has been placed in the public domain:

To the extent possible under law, Christian Stigen Larsen has waived all copyright and related or neighboring rights to the code for "luajit-cpp". This work is published from: Norway.