mraa icon indicating copy to clipboard operation
mraa copied to clipboard

Patch to compile under bullseye with gcc10 (RaspberryPi debian standard)

Open g-vidal opened this issue 5 years ago • 0 comments

gcc10 introduces stronger regulations and the linker fails with duplicate gVERSION and gVERSION_SHORT definition error. The trick I have found is to make those variables extern in mraahome/include/version.h, here is the patch that worked for me, I do not know if it is the "right way" to handle the problem that's why I do not push a PR, I will if it is OK and helps.

--- include/version.h~	2020-11-10 19:47:03.734243366 +0100
+++ include/version.h	2020-11-11 10:43:19.870180059 +0100
@@ -11,8 +11,8 @@
 extern "C" {
 #endif
 
-const char* gVERSION;
-const char* gVERSION_SHORT;
+extern const char* gVERSION;
+extern const char* gVERSION_SHORT;
 
 #ifdef __cplusplus
 }

g-vidal avatar Nov 11 '20 11:11 g-vidal