Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,8 @@ macsign.sh

code/Dll/*.so
code/Dll/*.o
code/Dll/*.dll
code/Dll/*.obj
code/Dll/*.dll
code/Dll/*.exp
code/Dll/*.lib
code/Dll/*.bat
15 changes: 15 additions & 0 deletions code/Dll/build-win-lua51.bat.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@echo off
:: 1. 设置 VS 环境 (路径需根据你的 VS 版本及安装位置修改)
:: 常用路径: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat
set VCVARS="C:\Program Files\Microsoft Visual Studio\18\Community\VC\Auxiliary\Build\vcvarsall.bat"

:: 调用环境脚本,x64 表示编译 64 位 DLL (必须用 call,否则脚本执行完 vcvarsall 就退出了)
call %VCVARS% x64

:: 2. 执行编译
:: /LD : 告诉编译器生成 DLL
:: /Fe : 指定输出文件名 (例如 mylib.dll)
:: /I : (可选) 指定头文件目录
cl.exe /LD hmmlua-win.c .\lua-5.1.5_Win64_vc17_lib\lua5.1.lib /Fe:hmmlua.dll /I .\lua-5.1.5_Win64_vc17_lib\\include

pause
6 changes: 3 additions & 3 deletions code/Dll/hmmlua-linux.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <lua.h>
#include <lauxlib.h>
#include <lualib.h>
#include ".\include\lua51\lua.h"
#include ".\include\lua51\lauxlib.h"
#include ".\include\lua51\lualib.h"

#ifdef _WIN32
#include "windows.h"
Expand Down
Loading