Search code examples
c++luaembedding

compiling Lua source with host C++ application


I'll be quick:

I have a C++ application that embeds Lua. Until now I have just used a pre-compiled lib that I link to the app. I would like to make a new approach by including the Lua source code and compile from scratch. What all would I need to do?

I'm running gcc v 4.4.3 in ubuntu 11.4

Thanks!


Solution

    1. Include the lua source code as included in the library - leave out the .c files which contain a main()
    2. Make the proper #define for your operating system (see the Lua makefile for which ones to use)
    3. Compile.