编译lua库 [英] Compiling lua library
问题描述
你好,
我需要一个较旧版本的lua库,所以我需要自己编译源代码。但是从现在开始我无法这样做。
i need an older build of the lua library, so i need to compile the source on my own. But since now i wasn't able to do so.
问题是大多数教程都引用了较新的lua源,并且他们改变了文件夹结构。
The problem is that most tutorials refer to the newer lua sources and they changed the folder structure.
我需要lua 5.0.2 https://www.lua.org/ftp/
I need lua 5.0.2 https://www.lua.org/ftp/
有以下文件夹结构:
/包括
/ src
/ src / lib
/ src / luac
/ src / lua
/Include
/src
/src/lib
/src/luac
/src/lua
我将Include文件夹添加到INCLUDE变量并运行 cl
< span style =""> / MD / O2
/ c / DLUA_BUILD_AS_DLL
* 。 c在最后4个文件夹中。对于luac,我需要添加/ I".."另外。
接下来我运行 link / DLL
/ IMPLIB : lua5 。0 。2 .lib
/ OUT : lua5 。 0.2.dll
* 。 src文件夹中的obj和dll是已生成,但没有.lib文件。
我遵循了本教程:
https://blog.spreendigital.de/2015/01/16 / how-to-compile-lua-5-3-0-for-windows /并且下一步它说我需要lib。我尝试了这个教程用于5.3源代码并且它有效。
I added the Include folder to the INCLUDE variable and run cl
/MD /O2
/c /DLUA_BUILD_AS_DLL
*.c in the last 4 folders. For luac i needed to add /I ".." in addition.
Next i run link /DLL
/IMPLIB:lua5.0.2.lib
/OUT:lua5.0.2.dll
*.obj in the src folder and the dll was generated, but there is no .lib file.
I followed this tutorial:
https://blog.spreendigital.de/2015/01/16/how-to-compile-lua-5-3-0-for-windows/ and for the next step it says i need the lib. I tried this tutorial for the 5.3 source and it worked.
我希望你能指出我使用VS编译源代码的正确目录。
i hope you can point me into the right directory to compile the source using VS.
推荐答案
这是正确的方向: Lua邮件列表。 Lua用户irc chat
- pa
这篇关于编译lua库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!