provide a weak print char impl #674
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "mueller/provide-weak-print-char"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of a small workshop project fsfw-from-zero. Provide a weak print char impl which is suitable for hosts.
LGTM
@ -0,0 +1,10 @@
#include <stdio.h>
#include <stdbool.h>
void __attribute__((weak)) printChar(const char* character, bool errStream) {
Does not build with MSVC https://godbolt.org/z/s8hav4sdn
There seems to be solution for MSVC https://stackoverflow.com/questions/2290587/gcc-style-weak-linking-in-visual-studio
Wow, this looks.. interesting. Yet another MS specific solution
The solution above is for an extern const char*.
Actually, https://docs.microsoft.com/en-us/cpp/cpp/selectany?view=msvc-170 might work as well. I can't really test this as MSVC does not compile anyway, so I suggest support for this is added in a seprate PR.
Agree with robin, MSVC is not really a supported compiler atm.