lua-users home
lua-l archive

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


well I have created a VS dll project
I have added lua51 to the linker information and lua headers to the c++ include path
I have added __declspec(dllexport) to those functions I think needs it

something is wrong

i get wierd errors saying that i miss semicolons when i don't and such things

have i missed something?

On Wed, Oct 5, 2011 at 3:08 PM, steve donovan <steve.j.donovan@gmail.com> wrote:
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.