为 Lua for Windows 构建 luafilesystem [英] Building luafilesystem for Lua for Windows

查看:32
本文介绍了为 Lua for Windows 构建 luafilesystem的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对构建 makefile 一无所知 - 我正在尝试在 Windows 7 x86 中构建 luafilesystem 以与 Lua for Windows 一起使用.我已经在互联网上搜索了教程,但我无法弄清楚.我已经在开发人员命令提示符中运行 NMAKE,但收到以下错误:

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. 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:

C:UsersMeDesktopluafilesystem-masterluafilesystem-master>nmake -f Makefile.win

Microsoft (R) 程序维护实用程序版本 12.00.21005.1版权 (C) Microsoft Corporation.保留所有权利.

cl/c/Fosrclfs.obj/MD/O2/I"c:lua5.1include" srclfs.cMicrosoft (R) C/C++ Optimizing Compiler Version 18.00.30723 for x86版权 (C) Microsoft Corporation.保留所有权利.

lfs.c

srclfs.c(63):致命错误 C1083:无法打开包含文件:'lua.h':没有那个文件或目录

NMAKE : 致命错误 U1077: '"C:Program Files (x86)Microsoft Visual Studio 12.0VCBINcl.EXE"' : 返回代码 '0x2'

停止.

我不确定我做错了什么.我直接从官方 LuaFileSystem 存储库下载的文件集中没有 lua.h.

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.

我只想安装 lfs 以在 lua 中使用.如果您无法弄清楚我做错了什么但碰巧知道更简单的方法,请分享.我希望我提供了足够的信息.谢谢.

All I want is to install lfs to use in lua. 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.

推荐答案

你需要让你正在编译的 Lua 解释器被编译并在你的计算机上可用以访问它的头文件 (lua.h 和其他一些)和 Lua 库/dll 文件.在编译您需要的正确版本的 Lua 解释器(无论是 Lua 5.1 还是 Lua 5.2)后,设置环境变量(或更新 make 文件中的路径)LUA_LIBDIR、LUA_INC 和 LUA_LIB 以指向您的 lua-folderlua-foldersrc 和相应的 lua 库.

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. 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-foldersrc, and the lua lib correspondingly.

这篇关于为 Lua for Windows 构建 luafilesystem的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆