Installing luabind on Ubuntu

1

So I've been looking on the internet for a moment and found nearly no tutorial, or good instructions on how to install luabind. I found that I need to have boost and lua 5.xx installed to install it; I've already installed lua 5.3.1 ( which definitly works ), and installed boost like this : sudo apt-get install libboost-all-dev and checked it : it is in /usr/include/boost ;

Saw I installed those 2 libraries required. The Question would be how can I install luabind ? Are there any packages, or things like this ? Can any one give me some command line instructions so I can install it easily ? PS : I checked the official documentation, but for some reason it did not work.

MattMatt

Posted 2015-06-30T09:29:31.373

Reputation: 125

but for some reason it did not work: what exactly did not work? How exactly did it fail? – MariusMatutiae – 2015-06-30T09:35:57.533

In Ubuntu, luabind is available from the repos: apt-cache search luabind, libluabind-dbg - luabind c++ binding for lua: unstripped binaries, libluabind-dev - luabind c++ binding for lua: static library and headers, libluabind-doc - luabind c++ binding for lua: documentation files, libluabind-examples - luabind c++ binding for lua: example files, libluabind0.9.1 - luabind c++ binding for lua: runtime library – MariusMatutiae – 2015-06-30T09:40:07.017

I wrote : mkdir build; cd build; cmake ..; make -> it could not recognize som lua functions – MattMatt – 2015-06-30T09:41:57.210

start="2">

  • Ok, so I wrote sudo apt-get install libluabind-dev; it installed the static libraries; so now what argument should I pass to the linker ?
  • < – MattMatt – 2015-06-30T09:45:06.420

    Answers

    2

    In all currently supported versions of Ubuntu open the terminal and type:

    sudo apt install libluabind-dev
    

    libluabind-dev -- luabind c++ binding for lua: static library and headers
    Luabind is a library that helps you create bindings between C++ and Lua. It has the ability to expose functions and classes, written in C++, to Lua. It will also supply the functionality to define classes in lua and let them derive from other lua classes or C++ classes. Lua classes can override virtual functions from their C++ baseclasses.

    karel

    Posted 2015-06-30T09:29:31.373

    Reputation: 11 374

    1Ok, Thanks :) I did it; but what arguments should I pass to the linker ? ( for lua, I passed -lua -ldl ) – MattMatt – 2015-06-30T09:49:00.043

    1Found it : -lluabind – MattMatt – 2015-06-30T10:22:02.240