Configuring Visual Studio. We need to configure Visual Studio to let it know where and what libraries and header files to look for when compiling our project. Configuring Visual Studio after you have Lua library file is really simple.
Open up Visual Studio and create a new project. (File->New->Project)
Select an Empty Project and give it any name.
Go to Projects->”Your project name” Settings.
Navigate to Configuration Properties -> C/C++ -> General and under Additional Include Directories type the location to your src folder of your Lua directory.Alternatively, you could have copied lua.h, lua.lib, lua.exe in single folder but I have left managing your folders up to you
Again, under Configuration Properties->Linker->General, Additional Library Directories copy the same src location.
In the same Linker section go to Input and add lua5.2.lib under “Additional Dependencies”.
Setup the project folder. We are not quite done yet. One last step before you can start embedding your Lua library is to copy “lua.dll” file that was generated in the “src” directory and paste it in your project folders. This file must be in the same folder where your program’s executable file loads, usually in Debug folder.
Bookmarks