记录Windows下编译Makefile文件
因需要在windows环境下链接Lua库,其中需要使用Makefile文件,在下载Lua源代码后,需要安装gcc环境。
1. 下载gcc 编译器
进入gcc官网,下载release
64+32-bit MinGW-w64 edition. Includes GCC C/C++, GNU binutils, mingw32-make, GDB (64-bit), the MinGW-w64 runtime libraries and tools, and the windows-default-manifest package.
2. 安装gcc编译器
安装选择64位
3.配置环境变量
在编辑系统环境中,给PATH中添加刚刚安装的目录中的bin目录
4. 测试是否安装完成
管理员启动cmd,输入 gcc -v,会有如下显示
5.编译Makefile文件
进入Makefile文件所在源代码目录,然后运行命令:
mingw32-make mingw
运行完成后,Lua库文件就生成完成了。