build lua differently so that it has at least a prayer at interoperating with plug-in dlls. at least, it can load them. there may be other problems later due to the dlls generally being compiled against a different CRT (vc8) than our lua and luainterface (vc10). we could fix this if we needed to by compiling the CUSTOMIZED lua in vc8 and referencing it from the vc10 luainterface.

This commit is contained in:
zeromus 2012-04-05 01:05:08 +00:00
parent 39e640aee9
commit 3f6127152f
7 changed files with 16 additions and 5 deletions

View File

@ -158,6 +158,7 @@
<Compile Include="config\SoundConfig.Designer.cs">
<DependentUpon>SoundConfig.cs</DependentUpon>
</Compile>
<Compile Include="DisplayManager.cs" />
<Compile Include="Gameboy\Debugger.cs">
<SubType>Form</SubType>
</Compile>

Binary file not shown.

Binary file not shown.

View File

@ -15,16 +15,19 @@ using namespace System::Security;
#using <mscorlib.dll>
#include <string.h>
// #define LUA_BUILD_AS_DLL
#define LUA_BUILD_AS_DLL
#define LUA_LIB
#define LUA_CORE
#define lua_c
#define luac_c
#define loslib_c
extern "C"
{
#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"
}
// Not sure of the purpose of this, but I'm keeping it -kevinh
static int tag = 0;

View File

@ -94,8 +94,8 @@
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CallingConvention>StdCall</CallingConvention>
<DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<CallingConvention>Cdecl</CallingConvention>
</ClCompile>
<Link>
<AdditionalDependencies>
@ -136,7 +136,9 @@
</Reference>
</ItemGroup>
<ItemGroup>
<ClCompile Include="LuaDLL.cpp" />
<ClCompile Include="LuaDLL.cpp">
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</PreprocessToFile>
</ClCompile>
<ClCompile Include="luaglue.cpp" />
</ItemGroup>
<ItemGroup>

View File

@ -1,10 +1,12 @@
// #define LUA_BUILD_AS_DLL
#define LUA_BUILD_AS_DLL
#define LUA_LIB
#define LUA_CORE
#define lua_c
#define luac_c
#define loslib_c
extern "C" {
#include "lua.h"
#include "lapi.c"
@ -33,9 +35,11 @@
#include "ltable.c"
#include "ltablib.c"
#include "ltm.c"
#include "lua.c"
//#include "lua.c"
// #include "luac.c"
#include "lundump.c"
#include "lvm.c"
#include "lzio.c"
// #include "print.c"
}

View File

@ -73,6 +73,7 @@ static lua_Number LoadNumber(LoadState* S)
return x;
}
#undef LoadString
static TString* LoadString(LoadState* S)
{
size_t size;