DreamMaoMao / hycov

hyprland overview mode plugin,a new tile window workflow
MIT License
331 stars 29 forks source link

I'm getting an error while building #11

Closed craftergarage closed 11 months ago

craftergarage commented 11 months ago
bash install.sh
-- The C compiler identification is GNU 13.2.1 -- The CXX compiler identification is GNU 13.2.1 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found PkgConfig: /usr/bin/pkg-config (found version "2.0.3") -- Checking for modules 'hyprland;pixman-1;libdrm;pango;pangocairo' -- Found hyprland, version 0.30.0 -- Found pixman-1, version 0.42.2 -- Found libdrm, version 2.4.118 -- Found pango, version 1.51.0 -- Found pangocairo, version 1.51.0 -- Configuring done (0.6s) -- Generating done (0.0s) -- Build files have been written to: /home/User/hycov/build [ 20%] Building CXX object CMakeFiles/hycov.dir/src/main.cpp.o [ 40%] Building CXX object CMakeFiles/hycov.dir/src/dispatchers.cpp.o [ 60%] Building CXX object CMakeFiles/hycov.dir/src/GridLayout.cpp.o [ 80%] Building CXX object CMakeFiles/hycov.dir/src/globaleventhook.cpp.o /home/User/hycov/src/globaleventhook.cpp: In function 'void hkOnSwipeBegin(void, wlr_pointer_swipe_begin_event)': /home/User/hycov/src/globaleventhook.cpp:47:17: UYARI: comparison of integer expressions of different signedness: 'uint32_t' {aka 'unsigned int'} and 'int' [-Wsign-compare] 47
if(e->fingers == g_swipe_fingers){ ~~~^~~~~~ /home/User/hycov/src/globaleventhook.cpp: At global scope: /home/User/hycov/src/globaleventhook.cpp:99:35: hata: 'SCallbackInfo' has not been declared 99 static void mouseMoveHook(void *, SCallbackInfo &info, std::any data) ^~~~~ /home/User/hycov/src/globaleventhook.cpp:106:37: hata: 'SCallbackInfo' has not been declared 106 static void mouseButtonHook(void *, SCallbackInfo &info, std::any data) ^~~~~ /home/User/hycov/src/globaleventhook.cpp: In function 'void mouseButtonHook(void*, int&, std::any)': /home/User/hycov/src/globaleventhook.cpp:109:8: hata: request for member 'cancelled' in 'info', which is of non-class type 'int' 109 info.cancelled = false; ^~~~~ /home/User/hycov/src/globaleventhook.cpp:116:12: hata: request for member 'cancelled' in 'info', which is of non-class type 'int' 116 info.cancelled = true; ^~~~~ /home/User/hycov/src/globaleventhook.cpp:124:12: hata: request for member 'cancelled' in 'info', which is of non-class type 'int' 124 info.cancelled = true; ^~~~~ /home/User/hycov/src/globaleventhook.cpp: In function 'void registerGlobalEventHook()': /home/User/hycov/src/globaleventhook.cpp:164:73: UYARI: converting from 'void (CInputManager::)(wlr_pointer_swipe_begin_event)' to 'void*' [-Wpmf-conversions] 164 g_pOnSwipeBeginHook = HyprlandAPI::createFunctionHook(PHANDLE, (void)&CInputManager::onSwipeBegin, (void)&hkOnSwipeBegin); ^~~~~~~~ /home/User/hycov/src/globaleventhook.cpp:165:71: UYARI: converting from 'void (CInputManager::)(wlr_pointer_swipe_end_event)' to 'void*' [-Wpmf-conversions] 165 g_pOnSwipeEndHook = HyprlandAPI::createFunctionHook(PHANDLE, (void)&CInputManager::onSwipeEnd, (void)&hkOnSwipeEnd); ^~~~~~ /home/User/hycov/src/globaleventhook.cpp:166:74: UYARI: converting from 'void (CInputManager::)(wlr_pointer_swipe_update_event)' to 'void*' [-Wpmf-conversions] 166 g_pOnSwipeUpdateHook = HyprlandAPI::createFunctionHook(PHANDLE, (void)&CInputManager::onSwipeUpdate, (void)&hkOnSwipeUpdate); ^~~~~~~~~ /home/User/hycov/src/globaleventhook.cpp:168:82: UYARI: converting from 'void (GridLayout::)(CWindow)' to 'void*' [-Wpmf-conversions] 168 g_pOnWindowRemovedTilingHook = HyprlandAPI::createFunctionHook(PHANDLE, (void)&GridLayout::onWindowRemovedTiling, (void)&hkOnWindowRemovedTiling); ^~~~~~~~~~ /home/User/hycov/src/globaleventhook.cpp:182:79: hata: 'SCallbackInfo' has not been declared 182 HyprlandAPI::registerCallbackDynamic(PHANDLE, "mouseMove",[&](void* self, SCallbackInfo& info, std::any data) { mouseMoveHook(self, info, data); }); ^~~~~ /home/User/hycov/src/globaleventhook.cpp:182:63: hata: could not convert 'registerGlobalEventHook()::<lambda(void, int&, std::any)>()' from 'registerGlobalEventHook()::<lambda(void, int&, std::any)>' to 'HOOK_CALLBACK_FN' {aka 'std::function<void(void*, std::any)>'} 182 HyprlandAPI::registerCallbackDynamic(PHANDLE, "mouseMove",[&](void* self, SCallbackInfo& info, std::any data) { mouseMoveHook(self, info, data); }); ^~~~~~~~~~~~~~~~~~~~
registerGlobalEventHook()::<lambda(void*, int&, std::any)>
/home/User/hycov/src/globaleventhook.cpp:183:82: hata: 'SCallbackInfo' has not been declared 183 HyprlandAPI::registerCallbackDynamic(PHANDLE, "mouseButton", [&](void* self, SCallbackInfo& info, std::any data) { mouseButtonHook(self, info, data); }); ^~~~~ /home/User/hycov/src/globaleventhook.cpp:183:66: hata: could not convert 'registerGlobalEventHook()::<lambda(void, int&, std::any)>()' from 'registerGlobalEventHook()::<lambda(void, int&, std::any)>' to 'HOOK_CALLBACK_FN' {aka 'std::function<void(void*, std::any)>'} 183 HyprlandAPI::registerCallbackDynamic(PHANDLE, "mouseButton", [&](void* self, SCallbackInfo& info, std::any data) { mouseButtonHook(self, info, data); }); ^~~~~~~~~~~~~~~~~~~~~~
registerGlobalEventHook()::<lambda(void*, int&, std::any)>

make[2]: [CMakeFiles/hycov.dir/build.make:118: CMakeFiles/hycov.dir/src/globaleventhook.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:83: CMakeFiles/hycov.dir/all] Error 2 make: *** [Makefile:136: all] Error 2 cp: 'build/libhycov.so' failed to locate: No such file or directory

craftergarage commented 11 months ago

globaleventhook.cpp line 47 if(e->fingers == g_swipe_fingers){

change be must if (static_cast(e->fingers) == static_cast(g_swipe_fingers)) {

SCallbackInfo, MouseMoveHook, MouseButtonHook ----> It appears as "has not been declared"

How can I fix errors?

DreamMaoMao commented 11 months ago

/home/User/hycov/src/globaleventhook.cpp:在全局范围内: /home/User/hycov/src/globaleventhook.cpp:99:35: hata: 'SCallbackInfo' has not been declared /home/User/hycov/src/globaleventhook.cpp:99:35:hata:'SCallbackInfo'尚未声明

your hyrpalnd is too old, try latest hyprland-git