-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMake files do not automatically download the libraries when ran #16
Comments
Even after the libraries are downloaded and built, i get this error:
|
This comment has been minimized.
This comment has been minimized.
Interesting. which version of CMake are you on? |
It is version "CMake 3.16.0-rc4" OS X |
Hey, the CMake files are kinda broken, it took me ages to get it compiling but i managed to wrangle it. I had to replace the version of SOL with the latest version (21c030933f0c470ca328cdec51d847968370cd23) and also, linking the project raylib-lua-sol to the static lua53.lib to compile, and then moving the lua53.dll to the folder at runtime. Here's a release |
Ah! Good find. |
Strange that sol doesn't pack-in Lua. Is there a cmake option that we have to pass to SOL to make it work? Made this PR, but it isn't working for me right meow #17 |
Yeah there is something funny going on with sol, it really doesn't like to build. I can't remember what the cmake options were but i recall being able to use luajit with sol 😄 |
Just updated a few things. Mind having another try at it? |
Will do |
It still doesn't auto-download Lua, which may be a thing we want to add. a |
This comment has been minimized.
This comment has been minimized.
|
cmake-gui crashes for me. Through CLI it makes empty bin and CMakeFiles and does nothing else. I only have these issues on Windows. On Ubuntu all I had to do was install lua5.3, liblua5.3-dev, xorg-dev, and libglu1-mesa-dev (for some weird xrandr dependency) and it built fine. I really wish I could build on Windows though.. |
Might be a good idea to move from ExternalProject to git submodules. I'm assuming |
Yes |
Great! I'll hope to switch it over to a submodule. Seems ExternalProject isn't that stable across platforms. Thanks so much or the investigation here. |
After lots of messing around, I've gotten this to build successfully on Windows 10 with Visual Studio 2017 and cmake 3.17 . I'm not sure which changes I made were necessary and unnecessary but I'll put them all in a fork. These changes are ONLY FOR WINDOWS since rayliblua-sol seems to build on Ubuntu fine (and probably Mac as well). Hopefully I'm not forgetting anything: Building Lua 5.3. Helpful page here on how to do that on Windows.
Building everything:
|
Hi @RobLoach, Any chance to have prebuild binaries? Thanks |
@uSources Have you tried the steps/fork I posted above your comment? I was having the same issue. |
If you get a VS project up, I'd love to see it added 😉 |
@xharris I try, but i dont understand to much about c/c++ tools, maybe i can ask to a friend to help me. Thanks |
I've created a new Pull Request to bring all dependencies in locally: #24 ..... This means we will be able to target a specific version of Lua, and not have to worry about FetchProject not working. Would love some help testing on it! There is a new issue with Sol not defining the objects correctly, but I think that excited for a while... Hope to add Windows to the automated testing too. Just make sure you bring down the submodules too... |
Hi, i have cloned "submodule" branch of the repo. Now finds lua, raylib and sol2 correctly. That its perfect! I generete "MINGW32" template with cmake correctly but when i try to comple throws a error in libraylib-lua-sol dependecy Output:
|
I've also setup Windows testing on GitHub Actions for this. Here is the specific error you've found.... [ 92%] Building CXX object lib/CMakeFiles/libraylib-lua-sol.dir/libraylib-lua-sol.cpp.obj
In file included from C:/Users/usour/OneDrive/Desktop/raylib-lua-sol/vendor/sol2/include/sol/forward.hpp:31:0,
from C:/Users/usour/OneDrive/Desktop/raylib-lua-sol/vendor/sol2/include/sol/sol.hpp:47,
from C:/Users/usour/OneDrive/Desktop/raylib-lua-sol/include/raylib-lua-sol.hpp:5,
from C:\Users\usour\OneDrive\Desktop\raylib-lua-sol\lib\libraylib-lua-sol.cpp:11:
C:/Users/usour/OneDrive/Desktop/raylib-lua-sol/vendor/sol2/include/sol/demangle.hpp:48:29: in constexpr expansion of std::basic_string_view<char>(((const char*)"{anonymous}"))'
C:/raylib/mingw/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/string_view:100:58: error: call to non-constexpr function 'static std::size_t std::char_traits<char>::length(const char_type*)'
: _M_len{__str == nullptr ? 0 : traits_type::length(__str)},
~~~~~~~~~~~~~~~~~~~^~~~~~~
mingw32-make[2]: *** [lib\CMakeFiles\libraylib-lua-sol.dir\build.make:80: lib/CMakeFiles/libraylib-lua-sol.dir/libraylib-lua-sol.cpp.obj] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:1149: lib/CMakeFiles/libraylib-lua-sol.dir/all] Error 2
mingw32-make: *** [Makefile:179: all] Error 2 On GitHub Actions Windows testing over at #27 , I'm getting this error... D:\a\raylib-lua-sol\raylib-lua-sol\include\raylib-lua-sol.hpp(664): message : see reference to function template instantiation 'sol::state_view &sol::state_view::set_function<double(__cdecl &)(void),const char(&)[8]>(Key,double (__cdecl &)(void))' being compiled [D:\a\raylib-lua-sol\raylib-lua-sol\build\bin\raylib-lua-sol.vcxproj]
with
[
Key=const char (&)[8]
]
raylib-lua-sol.vcxproj -> D:\a\raylib-lua-sol\raylib-lua-sol\build\bin\Debug\raylib-lua-sol.exe
Building Custom Rule D:/a/raylib-lua-sol/raylib-lua-sol/tests/CMakeLists.txt
raylib-lua-sol_test.cpp
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\winuser.h(4405,1): error C2733: 'UnhideWindow': you cannot overload a function with 'extern "C"' linkage [D:\a\raylib-lua-sol\raylib-lua-sol\build\tests\raylib-lua-sol_test.vcxproj]
D:\a\raylib-lua-sol\raylib-lua-sol\vendor\raylib\src\raylib.h(881,12): message : see declaration of 'UnhideWindow' [D:\a\raylib-lua-sol\raylib-lua-sol\build\tests\raylib-lua-sol_test.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\winuser.h(4597,1): error C2733: 'CloseWindow': you cannot overload a function with 'extern "C"' linkage [D:\a\raylib-lua-sol\raylib-lua-sol\build\tests\raylib-lua-sol_test.vcxproj]
D:\a\raylib-lua-sol\raylib-lua-sol\vendor\raylib\src\raylib.h(874,12): message : see declaration of 'CloseWindow' [D:\a\raylib-lua-sol\raylib-lua-sol\build\tests\raylib-lua-sol_test.vcxproj] |
Hi, yes with "ninja" compiler im getting the same error, so i created makefile for mingw64 using cmake -G "MinGW Makefile" Maybe they give us different errors for using different compilers? |
Hi,
The files FindSol.cmake and FindRaylib.cmake do not automatically download the libraries on OS X 10.15.1.
If you change the flag QUIET to VERBOSE it fails but then carries on to download and building steps:
The verbose flag is not valid so it carries on, i installed raylib view brew but it didn't find the libraries in the first place.
The text was updated successfully, but these errors were encountered: