mpx / lua-cjson

Lua CJSON is a fast JSON encoding/parsing module for Lua
https://kyne.au/~mark/software/lua-cjson.php
MIT License
936 stars 478 forks source link

Error: error loading module 'cjson' from file %1 is not a valid Win32 application. #63

Closed OleeL closed 5 years ago

OleeL commented 6 years ago

I am running:

local cjson = require("cjson")

and in response I am getting this:

Error: error loading module 'cjson' from file 'C:\Program Files (x86)\Lua\5.1\systree\lib\lua\5.1\cjson.dll':
        %1 is not a valid Win32 application.

stack traceback:
        [string "boot.lua"]:637: in function <[string "boot.lua"]:633>
        [C]: at 0x7fffaa6d6130
        [C]: in function 'require'
        main.lua:2: in main chunk
        [C]: in function 'require'
        [string "boot.lua"]:475: in function <[string "boot.lua"]:311>
        [C]: in function 'xpcall'
        [string "boot.lua"]:645: in function <[string "boot.lua"]:639>
        [C]: in function 'xpcall

any ideas how to fix?

UPDATE: I just found out that cjson runs fine with just lua. I had been running it with love2d. Still looking into why I'm getting this error

cloewen8 commented 5 years ago

Did you ever manage to find a solution for this?

cloewen8 commented 5 years ago

One thing to check, if you are still having trouble with this. Try running it with a 32-bit version of Love2d. Worked for me with another module.