Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Check to make sure you didn't include <code>luac.c</code>, <code>lua.c</code>, and the source for any other programs that are included with Lua in with your source code. Lua's source includes a few extra utilities (i.e., luac), and chances are you've just included them in the project and forgotten to remove them, thus resulting in having more than one <code>main</code>.</p> <p>In short, those are separate programs that you <em>don't</em> add to your project. If you can, just build Lua normally, link to the library, and include the header files as normal.</p> <p>So, on the point of you misunderstanding how to use Lua, you probably did to some degree. It is entirely possible to just copy Lua's source into your code, though probably not advisable. What you really want to do is pull up the extracted Lua source in a terminal and build it. Then (according to Lua's <code>INSTALL</code> document), you'll want to type <code>make platform</code>, where you'll replace <code>platform</code> with whichever platform you're currently using (i.e., I'd use <code>macosx</code>, you might use <code>linux</code>, refer to the <code>INSTALL</code> for which platforms are supported). After that, it's up to you if you want to install it or not, but you'll just do <code>make install</code> (or <code>sudo make install</code>) to get that done.</p> <p>After that, either add the appropriate linker flags when compiling to link to Lua (e.g., <code>-llua</code>) or alter your project's settings in your editor of choice to do roughly the same thing. That said, you'll want to refer to the <code>INSTALL</code> document provided with Lua for complete instructions on this.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload