lua-users home
lua-l archive

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


On Sat, Jan 6, 2018 at 12:20 AM, Viacheslav Usov <via.usov@gmail.com> wrote:
> On Sat, Jan 6, 2018 at 8:45 AM, Russell Haley <russ.haley@gmail.com> wrote:
>
>>  Which, if I am reading it correctly, is saying that to succesful build a
>> DLL in Visual Studio I would either need to mark up the entire Lua API in
>> the header files with
>>
>> __declspec( dllimport ) void _lua_func_here(...);
>
> Which is already done through the LUA_API prefix, if LUA_BUILD_AS_DLL is
> defined. See luaconf.h.
>
> You might also want to check out vcpkg: https://github.com/Microsoft/vcpkg.
> If nothing else, its Lua port might be instructive.

I've never seen this. Thanks for the tip. It may be interesting to see
how they've handled various posix or gnu library requirements (or do
they just use mingw as well?).
It's interesting that Microsoft also uses cmake. It's also used quite
extensively in thier dotnet core builds.

>>  OR Every application (C++ only?) that is built under vs needs to be
>> patched to use
>>
>> extern "C" { #include "MyCHeader.h" }
>
> You are confused here. This is not specific to MSVC and is indeed something
> that needs to be done when C++ code interfaces with C code.
>
> Cheers,
> V.

'> print(lfs.currentdir())
C:\Program Files (x86)\PUC-Lua\5.3.4\x86

Thank you so much everyone.

Russ