lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Wed, Oct 5, 2011 at 3:02 PM, Oskar Forsslund
<matrixsmurfen@googlemail.com> wrote:
> I really don't know how. The best thing to do would probably be to build
> some sort of dll project in VS from the c-file but i have no idea what to do
> to make that work

It's not too difficult. VS needs to know where to find the Lua
headers, so you must set this. You then have to make the Lua import
library part of the project as well.

The other 'gotcha' when building Lua DLLs on Windows is to make sure
that the main luaopen_whatever function is exported from the DLL - I
think that's where you either need to use __dclspec(dllexport)
attribute on that function or include a .def file

steve d.