lua-openai icon indicating copy to clipboard operation
lua-openai copied to clipboard

Module `cjson` is missing

Open dvdvideo1234 opened this issue 8 months ago • 2 comments

Hello,

After trying one example my system seem to miss the cjson Lua api:

stack traceback:
	[C]: in function 'require'
	C:/Programs/ZeroBraineIDE/lua-openai/openai\init.lua:3: in main chunk
	[C]: at 0x66df0d2b
	[C]: in function 'require'
	...roBraineIDE\ZeroBraineProjects\GmodLanguage\GPT\main.lua:16: in main chunk
	[C]: at 0x00401b00

I see I need this version, but I am unable to compile it with Code blocks: https://github.com/openresty/lua-cjson/

dvdvideo1234 avatar Mar 19 '25 09:03 dvdvideo1234

Hello,

Actually the configuration needed a lua module parth:

Image

Image

After that it will generate a Code blocks project which when compiled will produce the lua module

dvdvideo1234 avatar Apr 09 '25 08:04 dvdvideo1234

The module compiles perfectly but it cannot be loaded in the Lua environment:

C:\Programs\ZeroBraineIDE\bin\lua54.exe: error loading module 'cjson' from file 'C:/Programs/ZeroBraineIDE/lua-cjson/build/cjson.dll':
	%1 is not a valid Win32 application.

dvdvideo1234 avatar Apr 09 '25 10:04 dvdvideo1234