RobLoach / raylib-lua-sol

A simple and easy-to-use Lua library to enjoy videogames programming
http://www.raylib.com/
Other
94 stars 15 forks source link

Does not compile #35

Open paines opened 4 years ago

paines commented 4 years ago

It fails compiling under Ubuntu 20 with

[ 94%] Built target lua
[ 97%] Linking CXX executable raylib-lua-sol
/usr/bin/ld: ../liblua.a(loslib.c.o): in function `os_tmpname':
loslib.c:(.text+0x18b): warning: the use of `tmpnam' is dangerous, better use `mkstemp'
/usr/bin/ld: CMakeFiles/raylib-lua-sol.dir/raylib-lua-sol.cpp.o: in function `raylib_lua_sol_rlgl(sol::state&)':
raylib-lua-sol.cpp:(.text+0xce9): undefined reference to `rlUnproject'
/usr/bin/ld: CMakeFiles/raylib-lua-sol.dir/raylib-lua-sol.cpp.o: in function `raylib_lua_sol_functions(sol::state&)':
raylib-lua-sol.cpp:(.text+0xa867): undefined reference to `LoadImageEx'
/usr/bin/ld: raylib-lua-sol.cpp:(.text+0xadb0): undefined reference to `ImageExtractPalette'
/usr/bin/ld: raylib-lua-sol.cpp:(.text+0xc799): undefined reference to `SetMusicLoopCount'
collect2: error: ld returned 1 exit status
make[2]: *** [bin/CMakeFiles/raylib-lua-sol.dir/build.make:86: bin/raylib-lua-sol] Error 1
make[1]: *** [CMakeFiles/Makefile2:970: bin/CMakeFiles/raylib-lua-sol.dir/all] Error 2

I then took out ImageExtraPalette and SetMusicLoopCount from include/raylib-lua-sol.hpp but the rlUnproject and LoadImageEx undefied references stay.

sofianto commented 4 years ago

hello sir, I want to ask about my problem when building this Raylib binding Lua with the mingw32-w64-i686 compiler on Windows 10 I got this message:

[ 96%] Linking C static library libraylib_static.a [ 96%] Built target raylib_static Scanning dependencies of target raylib-lua-sol [ 98%] Building CXX object bin/CMakeFiles/raylib-lua-sol.dir/raylib-lua-sol.cpp.obj g++.exe: error: /bigobj: No such file or directory g++.exe: error: /bigobj: No such file or directory mingw32-make[2]: [bin\CMakeFiles\raylib-lua-sol.dir\build.make:83: bin/CMakeFiles/raylib-lua-sol.dir/raylib-lua-sol.cpp.obj] Error 1 mingw32-make[1]: [CMakeFiles\Makefile2:1131: bin/CMakeFiles/raylib-lua-sol.dir/all] Error 2 mingw32-make: *** [Makefile:182: all] Error 2

is there a solution for me