pkulchenko / ZeroBraneStudio

Lightweight Lua-based IDE for Lua with code completion, syntax highlighting, live coding, remote debugger, and code analyzer; supports Lua 5.1, 5.2, 5.3, 5.4, LuaJIT and other Lua interpreters on Windows, macOS, and Linux
http://studio.zerobrane.com/
Other
2.6k stars 519 forks source link

Problems with using clibs on Win10 #1119

Closed asket-stubborn closed 2 years ago

asket-stubborn commented 2 years ago

ZeroBraneStudio\bin/clibs/winapi.dll when adding your own libraries or using standard clibs, it processes Linux-style slashes inside a folder, everything is fine up to the folder with the program. A hex error occurs due to the mixing of styles.

ㄥ⃥→￱圠湩㈳. - it's when I copy to browser изображение_2021-08-20_125347

pkulchenko commented 2 years ago

There is something else going on, as the mixed slashes won't stop Lua from loading a correct module. How are you loading the winapi.dll module and what version of Lua are you using? This looks like a case when modules for different versions of Lua are mixed together.

asket-stubborn commented 2 years ago

5.3 and winapi that in kit with Studio only. I try to use it with lua 5.3 and love. And there is that case

pkulchenko commented 2 years ago

That's the problem, because winapi packaged with the IDE is for Lua 5.1 and you won't be able to use it with Lua 5.3. You'll need to compile winapi.dll for Lua 5.3. You can use the build scripts that come with the IDE as long as you have the mingw/gcc compiler configured. You can then run (cd build; bash build-win32.sh lua 5.3 winapi) to compile the library for Lua 5.3. You can also download a pre-compiled winapi library for Lua 5.3.