Giter Site home page Giter Site logo

Comments (2)

MarcusCalhoun-Lopez avatar MarcusCalhoun-Lopez commented on August 11, 2024

a8bc29c muddies the issue a bit.
If Lua is built with C++, surrounding the Lua headers with extern "C" { means the name mangled symbols are not found.

from gpick.

thezbyg avatar thezbyg commented on August 11, 2024

@ryandesign I agree that README should mention that C++ Lua library variant is required and will soon improve it.

@MarcusCalhoun-Lopez C++ Lua library can have unmangled symbols but it requires patched src/luaconf.h file (see https://sources.debian.org/patches/lua5.4/5.4.4-3/0003-extern_C.patch/). If symbols are mangled then extern "C" { will have to be removed from src/Lua.h file. Different Linux distributions do different things, but if this patch is only applied on Debian/Ubuntu then I could add a new build option to specify which type of Lua library will be linked.

Non C++ Lua library could also be used, but it would leak memory on Lua errors, because Lua uses different error handling method depending on used compiler. C version uses longjump and C++ version uses exceptions. If some C++ function expects to release allocated memory on exit from function or scope, then this release will not happen if longjump is used, because a simple jump to Lua error handling code will be performed.

from gpick.

Related Issues (20)

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.