Browse Source

Update static binary compilation instructions

- Use our liblua instead of system liblua (that Liblua won't take advantage of our magic)
- Must use -lm when linking

Maybe there's something cleverer with pkg-config but this is good enough for now.
Hugo Musso Gualandi 1 year ago
parent
commit
510dfbd880
1 changed files with 1 additions and 1 deletions
  1. 1 1
      README.md

+ 1 - 1
README.md

@@ -39,7 +39,7 @@ Example:
 `-e` just tells the compiler to add a `main` symbol/function so the file can be quickly compiled to an executable like:
 ```bash
 ./src/luaot test.lua -o testcompiled.c -e # Compile test.lua to testcompiled.c and add a main func for compiling to executables
-gcc -o testexec testcompiled.c -llua5.4 -I./src # Compile testcompiled to an executable that will run the lua code
+gcc -o testexec testcompiled.c src/liblua.a -I./src -lm # Compile testcompiled to an executable that will run the lua code
 ```
 # Experiments