简体   繁体   English

为Windows构建Lua的luafilesystem

[英]Building luafilesystem for Lua for Windows

I haven't a clue when it comes to building makefiles - I am trying to build luafilesystem in Windows 7 x86 for use with Lua for Windows. 关于生成makefile文件,我一无所知-我正在尝试在Windows 7 x86中构建luafilesystem以与Windows Lua一起使用。 I have scoured the internet for tutorials but I just can't figure it out. 我已经在网上搜寻了教程,但是我无法弄清楚。 I got as far as to run NMAKE in the Developer Command Prompt but I received the following error: 我可以在开发人员命令提示符中运行NMAKE,但收到以下错误:

C:\\Users\\Me\\Desktop\\luafilesystem-master\\luafilesystem-master>nmake -f Makefile.win

Microsoft (R) Program Maintenance Utility Version 12.00.21005.1 Copyright (C) Microsoft Corporation. All rights reserved. Microsoft (R) Program Maintenance Utility Version 12.00.21005.1 Copyright (C) Microsoft Corporation. All rights reserved. Copyright (C) Microsoft Corporation. All rights reserved.

cl /c /Fosrc\\lfs.obj /MD /O2 /I"c:\\lua5.1\\include" src\\lfs.c Microsoft (R) C/C++ Optimizing Compiler Version 18.00.30723 for x86 Copyright (C) Microsoft Corporation. All rights reserved. cl /c /Fosrc\\lfs.obj /MD /O2 /I"c:\\lua5.1\\include" src\\lfs.c Microsoft (R) C/C++ Optimizing Compiler Version 18.00.30723 for x86 Copyright (C) Microsoft Corporation. All rights reserved. Copyright (C) Microsoft Corporation. All rights reserved.

lfs.c

src\\lfs.c(63) : fatal error C1083: Cannot open include file: 'lua.h': No such file or directory

NMAKE : fatal error U1077: '"C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\BIN\\cl.EXE"' : return code '0x2'

Stop.

I'm not sure what I'm doing wrong. 我不确定自己在做什么错。 There was no lua.h in the set of files I downloaded directly from the official LuaFileSystem repository. 我直接从官方LuaFileSystem存储库下载的文件集中没有lua.h。

All I want is to install lfs to use in lua. 我只想安装可在lua中使用的lfs。 If you can't figure out what I'm doing wrong but happen to know an easier way, please share. 如果您不知道我在做什么,但碰巧知道一种更简单的方法,请分享。 I hope I've provided enough information. 希望我提供了足够的信息。 Thanks. 谢谢。

You need to have the Lua interpreter you are compiling against to be compiled and available on your computer to access its header files ( lua.h and few others) and Lua library/dll files. 您需要拥有要编译的Lua解释器,并且可以在计算机上使用它来访问其头文件( lua.h和其他一些文件)和Lua库/ dll文件。 After you compile the right version of Lua interpreter you need (whether Lua 5.1 or Lua 5.2), set the environmental variables (or update the paths in the make file) LUA_LIBDIR, LUA_INC and LUA_LIB to point to your lua-folder , lua-folder\\src , and the lua lib correspondingly. 编译所需的正确版本的Lua解释器(Lua 5.1或Lua 5.2)之后,设置环境变量(或更新make文件中的路径)LUA_LIBDIR,LUA_INC和LUA_LIB指向您的lua-folderlua-folder\\src和相应的lua lib。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM