From b077f24a504d125edc37e23fe8d141402baf9f4e Mon Sep 17 00:00:00 2001 From: Misa Date: Tue, 9 Jan 2024 11:11:15 -0800 Subject: [PATCH] CWrappers.cpp: Extern "C" While working on adding a screenshots keybind, I encountered a link error with these functions. Wrapping them in `extern "C"` fixed it. It's most likely due to the fact that they were `extern "C"` in the header, but not in the `.cpp` file. They should be both `extern "C"`'d regardless. --- desktop_version/src/CWrappers.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/desktop_version/src/CWrappers.cpp b/desktop_version/src/CWrappers.cpp index 1458a0c8..ec6672d3 100644 --- a/desktop_version/src/CWrappers.cpp +++ b/desktop_version/src/CWrappers.cpp @@ -5,6 +5,9 @@ #include "Localization.h" #include "UtilityClass.h" +extern "C" +{ + char* HELP_number_words(int _t, const char* number_class) { /* C wrapper for UtilityClass::number_words. @@ -23,3 +26,5 @@ uint32_t LOC_toupper_ch(uint32_t ch) { return loc::toupper_ch(ch); } + +} /* extern "C" */