jmckaskill/luaffi — Issue #3: Windows build failure (VS2010)
Author: daurnimator
Created: 2011-10-27 00:38:38+00:00
State: open

U:\Programming\luaffi>msvcbuild.bat

U:\Programming\luaffi>"C:\Program Files (x86)\Lua\5.1\lua.exe" dynasm\dynasm.lua
-LNE -D X32WIN -o call_x86.h call_x86.dasc

U:\Programming\luaffi>"C:\Program Files (x86)\Lua\5.1\lua.exe" dynasm\dynasm.lua
-LNE -D X64 -o call_x64.h call_x86.dasc

U:\Programming\luaffi>"C:\Program Files (x86)\Lua\5.1\lua.exe" dynasm\dynasm.lua
-LNE -D X64 -D X64WIN -o call_x64win.h call_x86.dasc

U:\Programming\luaffi>"C:\Program Files (x86)\Lua\5.1\lua.exe" dynasm\dynasm.lua
-LNE -o call_arm.h call_arm.dasc

U:\Programming\luaffi>cl.exe /nologo /c /MD /Ox /W3 /Zi /WX /D_CRT_SECURE_NO_DEP
RECATE /DLUA_FFI_BUILD_AS_DLL /I"msvc" /I"." /I"C:\Program Files (x86)\Lua\5.1\i
nclude" /DLUA_DLL_NAME="C:\Program Files (x86)\Lua\5.1\lua5.1.dll" call.c ctype.
c ffi.c parser.c
call.c
ctype.c
ffi.c
ffi.c(1882) : error C2220: warning treated as error - no 'object' file generated

ffi.c(1882) : warning C4129: 'P' : unrecognized character escape sequence
ffi.c(1882) : warning C4129: 'L' : unrecognized character escape sequence
ffi.c(1882) : warning C4129: 'l' : unrecognized character escape sequence
parser.c
Generating Code...

U:\Programming\luaffi>link.exe /nologo /debug /DLL /OUT:ffi.dll "C:\Program File
s (x86)\Lua\5.1\lib\lua5.1.lib" *.obj
call.obj : error LNK2019: unresolved external symbol _unpack_varargs_int referen
ced in function _reserve_code
call.obj : error LNK2019: unresolved external symbol _unpack_varargs_float refer
enced in function _reserve_code
call.obj : error LNK2019: unresolved external symbol _unpack_varargs_reg referen
ced in function _reserve_code
call.obj : error LNK2019: unresolved external symbol _unpack_varargs_stack_skip
referenced in function _reserve_code
call.obj : error LNK2019: unresolved external symbol _unpack_varargs_stack refer
enced in function _reserve_code
call.obj : error LNK2019: unresolved external symbol _to_typed_function referenc
ed in function _reserve_code
call.obj : error LNK2019: unresolved external symbol _to_typed_pointer reference
d in function _reserve_code
call.obj : error LNK2019: unresolved external symbol _to_enum referenced in func
tion _reserve_code
call.obj : error LNK2019: unresolved external symbol _to_uintptr referenced in f
unction _reserve_code
call.obj : error LNK2019: unresolved external symbol _to_uint32 referenced in fu
nction _reserve_code
call.obj : error LNK2019: unresolved external symbol _to_int32 referenced in fun
ction _reserve_code
call.obj : error LNK2019: unresolved external symbol _to_int64 referenced in fun
ction _reserve_code
call.obj : error LNK2019: unresolved external symbol _to_uint64 referenced in fu
nction _reserve_code
call.obj : error LNK2019: unresolved external symbol _to_float referenced in fun
ction _reserve_code
call.obj : error LNK2019: unresolved external symbol _to_double referenced in fu
nction _reserve_code
ffi.dll : fatal error LNK1120: 15 unresolved externals

U:\Programming\luaffi>if exist ffi.dll.manifest mt.exe /nologo -manifest ffi.dll
.manifest -outputresource:"ffi.dll;2"

U:\Programming\luaffi>cl.exe /nologo /c /MD /Ox /W3 /Zi /WX /D_CRT_SECURE_NO_DEP
RECATE /DLUA_FFI_BUILD_AS_DLL /I"msvc" /Gd test.c /Fo"test_cdecl.obj"
test.c

U:\Programming\luaffi>cl.exe /nologo /c /MD /Ox /W3 /Zi /WX /D_CRT_SECURE_NO_DEP
RECATE /DLUA_FFI_BUILD_AS_DLL /I"msvc" /Gz test.c /Fo"test_stdcall.obj"
test.c

U:\Programming\luaffi>cl.exe /nologo /c /MD /Ox /W3 /Zi /WX /D_CRT_SECURE_NO_DEP
RECATE /DLUA_FFI_BUILD_AS_DLL /I"msvc" /Gr test.c /Fo"test_fastcall.obj"
test.c

U:\Programming\luaffi>link.exe /nologo /debug /DLL /OUT:test_cdecl.dll test_cdec
l.obj
LINK : test_cdecl.dll not found or not built by the last incremental link; perfo
rming full link
Creating library test_cdecl.lib and object test_cdecl.exp

U:\Programming\luaffi>link.exe /nologo /debug /DLL /OUT:test_stdcall.dll test_st
dcall.obj
LINK : test_stdcall.dll not found or not built by the last incremental link; per
forming full link
Creating library test_stdcall.lib and object test_stdcall.exp

U:\Programming\luaffi>link.exe /nologo /debug /DLL /OUT:test_fastcall.dll test_f
astcall.obj
LINK : test_fastcall.dll not found or not built by the last incremental link; pe
rforming full link
Creating library test_fastcall.lib and object test_fastcall.exp

U:\Programming\luaffi>if exist test_cdecl.dll.manifest mt.exe /nologo -manifest
test_cdecl.dll.manifest -outputresource:"test_cdecl.dll;2"

U:\Programming\luaffi>if exist test_stdcall.dll.manifest mt.exe /nologo -manifes
t test_stdcall.dll.manifest -outputresource:"test_stdcall.dll;2"

U:\Programming\luaffi>if exist test_fastcall.dll.manifest mt.exe /nologo -manife
st test_fastcall.dll.manifest -outputresource:"test_fastcall.dll;2"

U:\Programming\luaffi>del *.obj *.manifest