Closed ezntek closed 6 months ago
I'm using x86_64 Arch Linux, and I have all necessary dependencies installs (yes, glm) but on build, your code throws a stdandard library error:
glm
[1/13] Compiling C++ object src/gestures/libgestures.a.p/Shared.cpp.o [2/13] Compiling C++ object src/gestures/libgestures.a.p/DragGesture.cpp.o [3/13] Compiling C++ object src/gestures/libgestures.a.p/CompletedGesture.cpp.o [4/13] Compiling C++ object subprojects/wf-touch/libwftouch.a.p/src_math.cpp.o [5/13] Compiling C++ object subprojects/wf-touch/libwftouch.a.p/src_touch.cpp.o [6/13] Compiling C++ object subprojects/wf-touch/libwftouch.a.p/src_actions.cpp.o [7/13] Linking static target subprojects/wf-touch/libwftouch.a [8/13] Compiling C++ object src/gestures/libgestures.a.p/Actions.cpp.o [9/13] Compiling C++ object src/gestures/libgestures.a.p/Gestures.cpp.o [10/13] Linking static target src/gestures/libgestures.a [11/13] Compiling C++ object src/libhyprgrass.so.p/main.cpp.o FAILED: src/libhyprgrass.so.p/main.cpp.o c++ -Isrc/libhyprgrass.so.p -Isrc -I../src -Isubprojects/wf-touch -I../subprojects/wf-touch -I/usr/include -I/usr/include/pixman-1 -I/usr/include/libdrm -I/home/ezntek/.local/share/hyprpm/headersRoot/include/hyprland/protocols -I/home/ezntek/.local/share/hyprpm/headersRoot/include/hyprland/wlroots -I/home/ezntek/.local/share/hyprpm/headersRoot/include -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O3 -std=c++23 -fPIC -DWLR_USE_UNSTABLE -MD -MQ src/libhyprgrass.so.p/main.cpp.o -MF src/libhyprgrass.so.p/main.cpp.o.d -o src/libhyprgrass.so.p/main.cpp.o -c ../src/main.cpp ../src/main.cpp: In function ‘PLUGIN_DESCRIPTION_INFO pluginInit(void*)’: ../src/main.cpp:48:43: error: invalid initialization of reference of type ‘const SConfigValue&’ from expression of type ‘Hyprlang::CConfigValue’ 48 | Hyprlang::CConfigValue((Hyprlang::INT)3)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../src/globals.hpp:3, from ../src/GestureManager.hpp:4, from ../src/main.cpp:1: /home/ezntek/.local/share/hyprpm/headersRoot/include/hyprland/src/plugins/PluginAPI.hpp:115:93: note: in passing argument 3 of ‘bool HyprlandAPI::addConfigValue(void*, const std::string&, const SConfigValue&)’ 115 | APICALL bool addConfigValue(HANDLE handle, const std::string& name, const SConfigValue& value); | ~~~~~~~~~~~~~~~~~~~~^~~~~ ../src/main.cpp:50:43: error: invalid initialization of reference of type ‘const SConfigValue&’ from expression of type ‘Hyprlang::CConfigValue’ 50 | Hyprlang::CConfigValue((Hyprlang::STRING) "d")); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/ezntek/.local/share/hyprpm/headersRoot/include/hyprland/src/plugins/PluginAPI.hpp:115:93: note: in passing argument 3 of ‘bool HyprlandAPI::addConfigValue(void*, const std::string&, const SConfigValue&)’ 115 | APICALL bool addConfigValue(HANDLE handle, const std::string& name, const SConfigValue& value); | ~~~~~~~~~~~~~~~~~~~~^~~~~ ../src/main.cpp:52:43: error: invalid initialization of reference of type ‘const SConfigValue&’ from expression of type ‘Hyprlang::CConfigValue’ 52 | Hyprlang::CConfigValue((Hyprlang::FLOAT)1.0)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/ezntek/.local/share/hyprpm/headersRoot/include/hyprland/src/plugins/PluginAPI.hpp:115:93: note: in passing argument 3 of ‘bool HyprlandAPI::addConfigValue(void*, const std::string&, const SConfigValue&)’ 115 | APICALL bool addConfigValue(HANDLE handle, const std::string& name, const SConfigValue& value); | ~~~~~~~~~~~~~~~~~~~~^~~~~ ../src/main.cpp:54:43: error: invalid initialization of reference of type ‘const SConfigValue&’ from expression of type ‘Hyprlang::CConfigValue’ 54 | Hyprlang::CConfigValue((Hyprlang::INT)400)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/ezntek/.local/share/hyprpm/headersRoot/include/hyprland/src/plugins/PluginAPI.hpp:115:93: note: in passing argument 3 of ‘bool HyprlandAPI::addConfigValue(void*, const std::string&, const SConfigValue&)’ 115 | APICALL bool addConfigValue(HANDLE handle, const std::string& name, const SConfigValue& value); | ~~~~~~~~~~~~~~~~~~~~^~~~~ ../src/main.cpp:56:43: error: invalid initialization of reference of type ‘const SConfigValue&’ from expression of type ‘Hyprlang::CConfigValue’ 56 | Hyprlang::CConfigValue((Hyprlang::INT)0)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/ezntek/.local/share/hyprpm/headersRoot/include/hyprland/src/plugins/PluginAPI.hpp:115:93: note: in passing argument 3 of ‘bool HyprlandAPI::addConfigValue(void*, const std::string&, const SConfigValue&)’ 115 | APICALL bool addConfigValue(HANDLE handle, const std::string& name, const SConfigValue& value); | ~~~~~~~~~~~~~~~~~~~~^~~~~ [12/13] Compiling C++ object src/libhyprgrass.so.p/GestureManager.cpp.o FAILED: src/libhyprgrass.so.p/GestureManager.cpp.o c++ -Isrc/libhyprgrass.so.p -Isrc -I../src -Isubprojects/wf-touch -I../subprojects/wf-touch -I/usr/include -I/usr/include/pixman-1 -I/usr/include/libdrm -I/home/ezntek/.local/share/hyprpm/headersRoot/include/hyprland/protocols -I/home/ezntek/.local/share/hyprpm/headersRoot/include/hyprland/wlroots -I/home/ezntek/.local/share/hyprpm/headersRoot/include -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O3 -std=c++23 -fPIC -DWLR_USE_UNSTABLE -MD -MQ src/libhyprgrass.so.p/GestureManager.cpp.o -MF src/libhyprgrass.so.p/GestureManager.cpp.o.d -o src/libhyprgrass.so.p/GestureManager.cpp.o -c ../src/GestureManager.cpp ../src/GestureManager.cpp: In constructor ‘GestureManager::GestureManager()’: ../src/GestureManager.cpp:28:15: error: ‘struct SConfigValue’ has no member named ‘getDataStaticPtr’ 28 | ->getDataStaticPtr(); | ^~~~~~~~~~~~~~~~ ../src/GestureManager.cpp:31:15: error: ‘struct SConfigValue’ has no member named ‘getDataStaticPtr’ 31 | ->getDataStaticPtr(); | ^~~~~~~~~~~~~~~~ ../src/GestureManager.cpp: In member function ‘void GestureManager::emulateSwipeBegin(uint32_t)’: ../src/GestureManager.cpp:48:15: error: ‘struct SConfigValue’ has no member named ‘getDataStaticPtr’ 48 | ->getDataStaticPtr(); | ^~~~~~~~~~~~~~~~ ../src/GestureManager.cpp: In member function ‘void GestureManager::emulateSwipeUpdate(uint32_t)’: ../src/GestureManager.cpp:67:15: error: ‘struct SConfigValue’ has no member named ‘getDataStaticPtr’ 67 | ->getDataStaticPtr(); | ^~~~~~~~~~~~~~~~ ../src/GestureManager.cpp: In member function ‘virtual bool GestureManager::handleDragGesture(const DragGesture&)’: ../src/GestureManager.cpp:96:15: error: ‘struct SConfigValue’ has no member named ‘getDataStaticPtr’ 96 | ->getDataStaticPtr(); | ^~~~~~~~~~~~~~~~ ../src/GestureManager.cpp:99:15: error: ‘struct SConfigValue’ has no member named ‘getDataStaticPtr’ 99 | ->getDataStaticPtr(); | ^~~~~~~~~~~~~~~~ ../src/GestureManager.cpp:102:76: error: no matching function for call to ‘std::__cxx11::basic_string<char>::basic_string(<brace-enclosed initializer list>)’ 102 | auto const workspace_swipe_edge_str = std::string{*WORKSPACE_SWIPE_EDGE}; | ^ In file included from /usr/include/c++/13.2.1/string:54, from ../src/./gestures/Shared.hpp:3, from ../src/./gestures/CompletedGesture.hpp:2, from ../src/./gestures/Gestures.hpp:3, from ../src/GestureManager.hpp:2, from ../src/GestureManager.cpp:1: /usr/include/c++/13.2.1/bits/basic_string.h:783:9: note: candidate: ‘template<class _Tp, class> constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Tp&, const _Alloc&) [with <template-parameter-2-2> = _Tp; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ 783 | basic_string(const _Tp& __t, const _Alloc& __a = _Alloc()) | ^~~~~~~~~~~~ /usr/include/c++/13.2.1/bits/basic_string.h:783:9: note: template argument deduction/substitution failed: /usr/include/c++/13.2.1/bits/basic_string.h:771:9: note: candidate: ‘template<class _Tp, class> constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Tp&, size_type, size_type, const _Alloc&) [with <template-parameter-2-2> = _Tp; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ 771 | basic_string(const _Tp& __t, size_type __pos, size_type __n, | ^~~~~~~~~~~~ /usr/include/c++/13.2.1/bits/basic_string.h:771:9: note: template argument deduction/substitution failed: /usr/include/c++/13.2.1/bits/basic_string.h:748:9: note: candidate: ‘template<class _InputIterator, class> constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(_InputIterator, _InputIterator, const _Alloc&) [with <template-parameter-2-2> = _InputIterator; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ 748 | basic_string(_InputIterator __beg, _InputIterator __end, | ^~~~~~~~~~~~ /usr/include/c++/13.2.1/bits/basic_string.h:748:9: note: template argument deduction/substitution failed: /usr/include/c++/13.2.1/bits/basic_string.h:654:7: note: candidate: ‘template<class> constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(size_type, _CharT, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ 654 | basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc()) | ^~~~~~~~~~~~ /usr/include/c++/13.2.1/bits/basic_string.h:654:7: note: template argument deduction/substitution failed: /usr/include/c++/13.2.1/bits/basic_string.h:631:7: note: candidate: ‘template<class> constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ 631 | basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()) | ^~~~~~~~~~~~ /usr/include/c++/13.2.1/bits/basic_string.h:631:7: note: template argument deduction/substitution failed: /usr/include/c++/13.2.1/bits/basic_string.h:705:7: note: candidate: ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ 705 | basic_string(basic_string&& __str, const _Alloc& __a) | ^~~~~~~~~~~~ /usr/include/c++/13.2.1/bits/basic_string.h:705:7: note: candidate expects 2 arguments, 1 provided /usr/include/c++/13.2.1/bits/basic_string.h:700:7: note: candidate: ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ 700 | basic_string(const basic_string& __str, const _Alloc& __a) | ^~~~~~~~~~~~ /usr/include/c++/13.2.1/bits/basic_string.h:700:7: note: candidate expects 2 arguments, 1 provided /usr/include/c++/13.2.1/bits/basic_string.h:695:7: note: candidate: ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::initializer_list<_Tp>, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ 695 | basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc()) | ^~~~~~~~~~~~ /usr/include/c++/13.2.1/bits/basic_string.h:695:7: note: conversion of argument 1 would be ill-formed: /usr/include/c++/13.2.1/bits/basic_string.h:667:7: note: candidate: ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ 667 | basic_string(basic_string&& __str) noexcept | ^~~~~~~~~~~~ /usr/include/c++/13.2.1/bits/basic_string.h:667:7: note: conversion of argument 1 would be ill-formed: /usr/include/c++/13.2.1/bits/basic_string.h:609:7: note: candidate: ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, size_type, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]’ 609 | basic_string(const _CharT* __s, size_type __n, | ^~~~~~~~~~~~ /usr/include/c++/13.2.1/bits/basic_string.h:609:7: note: candidate expects 3 arguments, 1 provided /usr/include/c++/13.2.1/bits/basic_string.h:589:7: note: candidate: ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, size_type, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]’ 589 | basic_string(const basic_string& __str, size_type __pos, | ^~~~~~~~~~~~ /usr/include/c++/13.2.1/bits/basic_string.h:589:7: note: candidate expects 4 arguments, 1 provided /usr/include/c++/13.2.1/bits/basic_string.h:571:7: note: candidate: ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]’ 571 | basic_string(const basic_string& __str, size_type __pos, | ^~~~~~~~~~~~ /usr/include/c++/13.2.1/bits/basic_string.h:571:7: note: candidate expects 3 arguments, 1 provided /usr/include/c++/13.2.1/bits/basic_string.h:554:7: note: candidate: ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]’ 554 | basic_string(const basic_string& __str, size_type __pos, | ^~~~~~~~~~~~ /usr/include/c++/13.2.1/bits/basic_string.h:554:7: note: candidate expects 3 arguments, 1 provided /usr/include/c++/13.2.1/bits/basic_string.h:537:7: note: candidate: ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ 537 | basic_string(const basic_string& __str) | ^~~~~~~~~~~~ /usr/include/c++/13.2.1/bits/basic_string.h:537:7: note: conversion of argument 1 would be ill-formed: /usr/include/c++/13.2.1/bits/basic_string.h:525:7: note: candidate: ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ 525 | basic_string(const _Alloc& __a) _GLIBCXX_NOEXCEPT | ^~~~~~~~~~~~ /usr/include/c++/13.2.1/bits/basic_string.h:525:7: note: conversion of argument 1 would be ill-formed: /usr/include/c++/13.2.1/bits/basic_string.h:512:7: note: candidate: ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string() [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ 512 | basic_string() | ^~~~~~~~~~~~ /usr/include/c++/13.2.1/bits/basic_string.h:512:7: note: candidate expects 0 arguments, 1 provided /usr/include/c++/13.2.1/bits/basic_string.h:176:7: note: candidate: ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(__sv_wrapper, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ 176 | basic_string(__sv_wrapper __svw, const _Alloc& __a) | ^~~~~~~~~~~~ /usr/include/c++/13.2.1/bits/basic_string.h:176:7: note: candidate expects 2 arguments, 1 provided ../src/GestureManager.cpp: In member function ‘virtual void GestureManager::sendCancelEventsToWindows()’: ../src/GestureManager.cpp:244:15: error: ‘struct SConfigValue’ has no member named ‘getDataStaticPtr’ 244 | ->getDataStaticPtr(); | ^~~~~~~~~~~~~~~~ ../src/GestureManager.cpp: In member function ‘bool GestureManager::onTouchDown(wlr_touch_down_event*)’: ../src/GestureManager.cpp:262:15: error: ‘struct SConfigValue’ has no member named ‘getDataStaticPtr’ 262 | ->getDataStaticPtr(); | ^~~~~~~~~~~~~~~~ ../src/GestureManager.cpp: In member function ‘bool GestureManager::onTouchUp(wlr_touch_up_event*)’: ../src/GestureManager.cpp:308:15: error: ‘struct SConfigValue’ has no member named ‘getDataStaticPtr’ 308 | ->getDataStaticPtr(); | ^~~~~~~~~~~~~~~~ ../src/GestureManager.cpp:327:50: warning: control reaches end of non-void function [-Wreturn-type] 327 | const auto BLOCK = IGestureManager::onTouchUp(gesture_event); | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ ninja: build stopped: subcommand failed.
update hyprland or use older hyprgrass version
the latest hyprgrass release should work. If not, the one before that
I'm using x86_64 Arch Linux, and I have all necessary dependencies installs (yes,
glm
) but on build, your code throws a stdandard library error: