Xephobia
Xephobia

Reputation: 33

How to compile luaJit's c bytecode

you can generate bytecode in form of c with luaJIT : luajit -b main.lua main.c it generate a c code with no main so my guess is to link it. How to do that with mingw64?

Upvotes: 1

Views: 1649

Answers (1)

DarkWiiPlayer
DarkWiiPlayer

Reputation: 7056

You seem to misunderstand what exactly that does.

LuaJIT does not compile your Lua source code into equivalent C code. It compiles it to Lua bye code, and encodes this binary data as a static C array, so you can include the byte code directly in a program that uses LuaJIT and have it as a single executable.

Upvotes: 1

Related Questions