From cb0f3a7f9facf5285ae90100bb6c0848a75d5802 Mon Sep 17 00:00:00 2001 From: Liam Teale Date: Thu, 21 Nov 2024 12:03:36 -0800 Subject: [PATCH] force .a file creation thru anonymous global variable --- src/units/dummy.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/units/dummy.cpp b/src/units/dummy.cpp index b422cc3..fdbe3fb 100644 --- a/src/units/dummy.cpp +++ b/src/units/dummy.cpp @@ -2,3 +2,11 @@ // otherwise units does not compile reliably on all platforms // and the pros conductor will not let you create a template if there is // no .a file + +// a global, volatile variable in an anonymous namespace +// its put in an anonymous namespace to guarantee that there won't be any +// linker errors +// 10/10 codebase (i don't feel like PRing a fix to PROS, make is scary) +namespace { +volatile char dummy_var; +} \ No newline at end of file