pkulchenko / wxlua

wxlua: Lua bindings for wxWidgets cross-platform GUI toolkit; supports Lua 5.1, 5.2, 5.3, 5.4, LuaJIT and wxWidgets 3.x
307 stars 59 forks source link

Why there is no ready-to-use .so files or install via LuaRocks? (Trouble when compiling) #126

Closed jodros closed 1 year ago

jodros commented 1 year ago

Greetings,

after searching for any good GUI library for Lua, I've found your project some days ago and then I'm trying to compile it. I'm not used to compile stuff myself.

I followed the instructions in docs/install.md, but always get stuck at the 18% step.

[ 18%] Linking C shared library ../../lib/Debug/libwxlua_lua51-wxgtk2ud-3.2.0.2.so
/usr/lib64/gcc/x86_64-suse-linux/13/../../../../x86_64-suse-linux/bin/ld: cannot found -lreadline: No such file or directory
/usr/lib64/gcc/x86_64-suse-linux/13/../../../../x86_64-suse-linux/bin/ld: cannot found -lhistory: No such file or directory
collect2: error: ld execution failed with return code 1
make[2]: *** [modules/lua-5.1/CMakeFiles/LuaLib.dir/build.make:545: lib/Debug/libwxlua_lua51-wxgtk2ud-3.2.0.2.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:294: modules/lua-5.1/CMakeFiles/LuaLib.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

But my questions is: it wouldn't be much more accessible to everyone to deploy the compiled shared objects in LuaRocks? Or at least to include them in this repository?

Thank you for your attention.

pkulchenko commented 1 year ago

I followed the instructions in docs/install.md, but always get stuck at the 18% step.

I guess you need to provide readline and history libraries that wxgtk2ud depends on.

But my questions is: it wouldn't be much more accessible to everyone to deploy the compiled shared objects in LuaRocks? Or at least to include them in this repository?

The answer is here: https://github.com/pkulchenko/wxlua/issues/65#issuecomment-621275281

You can use the binaries included with ZeroBraneStudio (https://github.com/pkulchenko/ZeroBraneStudio/blob/master/bin/linux/x64/clibs/libwx.so and https://github.com/pkulchenko/ZeroBraneStudio/blob/master/bin/linux/x86/clibs/libwx.so), as they are compiled against Lua 5.1, which is what you're using. The IDE also includes the build scripts (in the build/ folder) that will build wxlua library for your platform and Lua version (if you need non-lua 5.1 one).