LuIbexWin is a specialized module that allows Lua to interact directly with the Windows API (Win32).
It provides access to native functions, structures, messages, and system utilities, making Lua a powerful tool for developing applications and scripts that require deep control of the Windows environment.
Before compiling and using LuIbexWin, make sure you have:
- CMake ≥ 3.16
- Visual Studio with C++ and MASM support (as
LuIbexWinonly supportsMSVC) - Lua installation (5.3 or newer) and in x64
- Sufficient disk space (as
LuIbexWinexposes many functions and complex structures)
You can see that the lua folder is empty, you need to put the includes and the library that the module requires.
- Includes
Create a folder in the lua folder called
includeIn the Lua Source folder go tosrc\and copy:lua.h, lua.hpp, lauxlib.h, luaconf.handlualib.htoinclude - Library
Create a folder in the lua folder called
libIn the build of the Lua Source you will findluaXX.lib, copy it toliband rename tolua.lib
-
Open a terminal in the project directory.
-
Create a build directory and navigate to it:
mkdir build cd build
-
Generate build files with CMake:
cmake ..
if you want to configure as static build just use:
cmake -DBUILD_STATIC=ON ..
-
Compile the library:
cmake --build . --config Release
This will produce
luibexwin.dllready to use.
To make Lua use LuIbexWin correctly:
-
Lua Modules: Copy the
ibexwindirectory (containingh.luaand other scripts) into your Lua modules folder (package.path). -
Native Modules: Copy
luibexwin.dllinto your Lua native libraries folder (package.cpath). -
Make sure
package.pathandpackage.cpathinclude these directories so thatrequire "ibexwin.h"work properly.