You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
When trying to compile the new Multiple Screens feature released yesterday I got this error on KDE neon: ```bash [ 83%] Building CXX object app/CMakeFiles/latte-dock.dir/lattedockadaptor.cpp.o [ 84%] Linking CXX executable ../bin/latte-dock /usr/bin/ld: CMakeFiles/latte-dock.dir/view/clonedview.cpp.o: in function `Latte::ClonedView::translateToClonesOrder(QList<int> const&)': clonedview.cpp:(.text+0x1aaa): undefined reference to `Latte::ClonedView::ERRORAPPLETID' collect2: error: ld returned 1 exit status make[2]: *** [app/CMakeFiles/latte-dock.dir/build.make:2270: bin/latte-dock] Error 1 make[1]: *** [CMakeFiles/Makefile2:1806: app/CMakeFiles/latte-dock.dir/all] Error 2 make: *** [Makefile:146: all] Error 2 ``` After some research I found this StackOverflow answer: https://stackoverflow.com/a/3026148 Which referenced this FAQ by Bjarne Stroustrup: https://www.stroustrup.com/bs_faq2.html#in-class In summary, if a `static const` is initialized in a class, and later is used as a reference in an implementation file, it should also be declared inside the implementation file. The initialization can live only inside the class. Maybe the compiler used by @mvourlakos has an optimization to overcome such construct. In my case by adding these two lines I could compile it on KDE neon (after fixing the first error, compilation failed on a second spot). |
3 years ago | |
---|---|---|
.. | ||
helpers | 3 years ago | |
indicator | 3 years ago | |
settings | 3 years ago | |
windowstracker | 3 years ago | |
CMakeLists.txt | 3 years ago | |
clonedview.cpp | 3 years ago | |
clonedview.h | 3 years ago | |
containmentinterface.cpp | 3 years ago | |
containmentinterface.h | 3 years ago | |
contextmenu.cpp | 3 years ago | |
contextmenu.h | 4 years ago | |
effects.cpp | 3 years ago | |
effects.h | 4 years ago | |
eventssink.cpp | 4 years ago | |
eventssink.h | 4 years ago | |
originalview.cpp | 3 years ago | |
originalview.h | 3 years ago | |
panelshadows.cpp | 4 years ago | |
panelshadows_p.h | 4 years ago | |
parabolic.cpp | 4 years ago | |
parabolic.h | 4 years ago | |
positioner.cpp | 3 years ago | |
positioner.h | 3 years ago | |
tasksmodel.cpp | 4 years ago | |
tasksmodel.h | 4 years ago | |
view.cpp | 3 years ago | |
view.h | 3 years ago | |
visibilitymanager.cpp | 3 years ago | |
visibilitymanager.h | 3 years ago |