From cc216721b8eaf9362c286163755eb4b3edd11fe6 Mon Sep 17 00:00:00 2001 From: kyren Date: Sun, 9 Jul 2017 17:05:54 -0400 Subject: [PATCH] slightly cleaner way of linking to an external liblua5.3, if the option is enabled --- build.rs | 2 +- src/ffi.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/build.rs b/build.rs index a17e451..84c37e5 100644 --- a/build.rs +++ b/build.rs @@ -60,6 +60,6 @@ fn main() { .file("lua/lutf8lib.c") .file("lua/lvm.c") .file("lua/lzio.c") - .compile("liblua.a"); + .compile("liblua5.3.a"); } } diff --git a/src/ffi.rs b/src/ffi.rs index 3c60ef0..4ac0f52 100644 --- a/src/ffi.rs +++ b/src/ffi.rs @@ -48,6 +48,7 @@ pub const LUA_TFUNCTION: c_int = 6; pub const LUA_TUSERDATA: c_int = 7; pub const LUA_TTHREAD: c_int = 8; +#[link(name = "lua5.3")] extern "C" { pub fn lua_close(state: *mut lua_State); pub fn lua_callk(