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.
2b039e1275
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 | |
---|---|---|
.. | ||
lattecontainmentplugin.cpp | 4 years ago | |
lattecontainmentplugin.h | 4 years ago | |
layoutmanager.cpp | 3 years ago | |
layoutmanager.h | 3 years ago | |
qmldir | 5 years ago | |
types.cpp | 4 years ago | |
types.h | 4 years ago |