Open bobstaff147 opened 8 months ago
The current reboot.h is not compatible with C++ due to the function name being mangled.
Can I suggest the file is changed as shown in this patch
--- /home/dev/picowota_blink/picowota/picowota_reboot/include/picowota/reboot.h +++ reboot.h @@ -11,6 +11,15 @@
+#ifdef cplusplus +extern "C" { +#endif + void picowota_reboot(bool to_bootloader); + +#ifdef cplusplus +} +#endif +
Thanks Bob S.
Thanks for your PR. Your solution approach solved my "undefined reference "issue. Is this related to the fact that the cmake lib is also named "picowota_reboot"?
Best wishes Oke
The current reboot.h is not compatible with C++ due to the function name being mangled.
Can I suggest the file is changed as shown in this patch
--- /home/dev/picowota_blink/picowota/picowota_reboot/include/picowota/reboot.h +++ reboot.h @@ -11,6 +11,15 @@
define PICOWOTA_BOOTLOADER_ENTRY_MAGIC 0xb105f00d
+#ifdef cplusplus +extern "C" { +#endif + void picowota_reboot(bool to_bootloader); + +#ifdef cplusplus +} +#endif +
endif / PICOWOTA_REBOOT_H /
Thanks Bob S.