sqlite3 - How do I build lsqlite3 for lua.5.3.1 -
i looking build lsqlite3 0.9.4 lua 5.3.1 on windows 10.
not entirely sure how go it.
there rockspec file not sure if should trying through that(because default think luarocks configured 5.1) or manually visual studio developer console.
unfortunately not have knowledge on should doing.
guess googling/trial , error here have done, , have no idea if correct forgive me.
cl /nologo /md /o2 -c -folsqlite3.obj -i"c:/lua/5.3.1/include" lsqlite3.c -dluaopen_lsqlite3=luaopen_lsqlite3complete
(basically got command luarocks when failed work)
, did this:
link.exe /dll /out:lsqlite3.dll lsqlite3.obj
which gave me bunch of unresolved external sqlite3 symbol errors kind of expected, not sure include in sqlite3..
any advice on how this?
first. ships sqilte sourece itself. luarocks has 2 modules. 1 require separate sqlite library. , 1 build sqlite , lsqlite in single file. has no external deps. think lsqlite3 has bug on windwos. provide access sqlite3_temp_directory
. not defined on windows host application should define it. lsqlite try use ifdef ignore this. test win32
macro not defined on ms compiler. have 2 ways. 1. edit rockspec/make file , define win32
2. edit source , use _win32
instead
this output luarocks make command
d:\tmp\lsqlite3_fsl09x>luarocks make lsqlite3-0.9.4-0.rockspec cl /nologo /md /o2 -c -folsqlite3.obj -ic:\luarocks\x86\5.1\include\ lsqlite3.c -dlsqlite_version="0.9.4" -dluaopen_lsqlite3=luaopen_lsqlite3complete lsqlite3.c cl /nologo /md /o2 -c -fosqlite3.obj -ic:\luarocks\x86\5.1\include\ sqlite3.c -dlsqlite_version="0.9.4" -dluaopen_lsqlite3=luaopen_lsqlite3complete sqlite3.c link -dll -def:lsqlite3complete.def -out:lsqlite3complete.dll c:\luarocks\x86\5.1\lib\lua51.lib lsqlite3.obj sqlite3.obj microsoft (r) incremental linker version 10.00.30319.01 copyright (c) microsoft corporation. rights reserved. creating library lsqlite3complete.lib , object lsqlite3complete.exp cl /nologo /md /o2 -c -folsqlite3.obj -ic:\luarocks\x86\5.1\include\ lsqlite3.c -dlsqlite_version="0.9.4" -ic:/luarocks/x86/external/include lsqlite3.c link -dll -def:lsqlite3.def -out:lsqlite3.dll c:\luarocks\x86\5.1\lib\/lua51.lib lsqlite3.obj -libpath:c:/luarocks/x86/external/lib sqlite3.lib microsoft (r) incremental linker version 10.00.30319.01 copyright (c) microsoft corporation. rights reserved. creating library lsqlite3.lib , object lsqlite3.exp lsqlite3 0.9.4-0 installed in c:\luarocks\x86\5.1\systree (license: mit/x11)
but if have no separate sqlite libray can remove 1 module form rockspec , use 1 (and rename module).
build = { type = "builtin", modules = { lsqlite3 = { sources = { "lsqlite3.c", "sqlite3.c" }, defines = {'lsqlite_version="0.9.4"'} } }, copy_directories = { 'doc', 'examples' } }
this output luarocks make command
d:\tmp\lsqlite3_fsl09x>luarocks make lsqlite3-0.9.4-0.rockspec cl /nologo /md /o2 -c -folsqlite3.obj -ic:\luarocks\x86\5.1\include\ lsqlite3.c -dlsqlite_version="0.9.4" lsqlite3.c cl /nologo /md /o2 -c -fosqlite3.obj -ic:\luarocks\x86\5.1\include\ sqlite3.c -dlsqlite_version="0.9.4" sqlite3.c link -dll -def:lsqlite3.def -out:lsqlite3.dll c:\luarocks\x86\5.1\lib\/lua51.lib lsqlite3.obj sqlite3.obj microsoft (r) incremental linker version 10.00.30319.01 copyright (c) microsoft corporation. rights reserved. creating library lsqlite3.lib , object lsqlite3.exp lsqlite3 0.9.4-0 installed in c:\luarocks\x86\5.1\systree (license: mit/x11)
Comments
Post a Comment