lua-users home
lua-l archive

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


How do you set the cpath?
it seems you may need to set the cpath like "….../luasql/?.dll”

> On Aug 4, 2016, at 06:05, Weinstein, Jay <Jay.Weinstein@leviton.com> wrote:
> 
> Thanks, but it didn't work.  
> 
> Jay
> 
> -----Original Message-----
> From: lua-l-bounces@lists.lua.org [mailto:lua-l-bounces@lists.lua.org] On Behalf Of gmc1
> Sent: Wednesday, August 03, 2016 1:52 PM
> To: Lua mailing list
> Subject: Vo veci: unable to load lsqlite3
> 
> 
> try lsqlite3
> 
> Odosielateľ 
> 
> "Weinstein, Jay" <Jay.Weinstein@leviton.com> napísal:
> 
> Hi,
> 
> I’m new to lua and I can’t seem to figure out how to get around the following problem.   
> 
> Thanks,
> Jay
> 
>> local table = require("sqlite3")
> stdin:1: module 'sqlite3' not found:
>        no field package.preload['sqlite3']
>        no file 'C:\Program Files (x86)\Lua\5.1\sqlite3.lua'
>        no file 'C:\Users\Jay.Weinstein\Downloads\Binaries-LuaDist-batteries-0.9.8-Windows-x86\lib\lua\5.1\luasql'
> stack traceback:
>        [C]: in function 'require'
>        stdin:1: in main chunk
>        [C]: ? ‘C:\Users\Jay.Weinstein\Downloads\Binaries-LuaDist-batteries-0.9.8-Windows-x86\lib\lua\5.1\luasql'
> 
> I’ve added C:\Users\Jay.Weinstein\Downloads\Binaries-LuaDist-batteries-0.9.8-Windows-x86\lib\lua\5.1\luasql to lua_cpath and lua_path and sqlite3.dll is in thhe luasql directory.