Skip to content

Embedding Lua in a C++ application using the RTTR reflection library, based on tutorials by Dave Poo on YouTube

Notifications You must be signed in to change notification settings

Taardal/cpp-lua-rttr

Repository files navigation

C++ Lua RTTR

Embedding Lua in a C++ application using the Run Time Type Reflection (RTTR) C++ reflection library.

This example is based on the Embedding Lua in C++ YouTube tutorial by Dave Poo.

Prerequisites :vertical_traffic_light:

Getting started :runner:

Getting the code :octocat:

  • Clone the repository: git clone https://github.com/taardal/cpp-lua-rttr

Running the app :rocket:

RTTR

App

  • Generate project files: cmake -S . -B build
  • Build executable from generated files: cmake --build build
  • Install executable: cmake --install build
  • Run the executable: ./app

Known problems :warning:

The build fails with the error below in the following environment:

MacOS 13.4
Xcode 14.3.1
Clang 14.0.3
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__functional/boyer_moore_searcher.h:26:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/vector:540:52: error: arithmetic on a pointer to an incomplete type 'rttr::argument'
        {return static_cast<size_type>(__end_cap() - this->__begin_);}

There is a working binary in the bin folder that was built in the following environment:

MacOS 12.6
Xcode 14.1
Clang 14.0

Resources :books:

About

Embedding Lua in a C++ application using the RTTR reflection library, based on tutorials by Dave Poo on YouTube

Topics

Resources

Stars

Watchers

Forks