DynamicLink: Tell compiler about invisible calls

This makes DynamicLink, and in fact all Demos, build cleanly with -Wmissing-declarations.

Note that this won't be necessary for 'normal' dynamic shared objects, as those
usually already declare their symbols in a header file.
This commit is contained in:
Ben Wiederhake 2020-08-11 23:59:15 +02:00 committed by Andreas Kling
parent 9e1ed4bb05
commit b493c6cd39
Notes: sideshowbarker 2024-07-19 03:41:43 +09:00

View file

@ -55,6 +55,12 @@ private:
Global g_glob { 5 };
extern "C" {
// Tell the compiler that these symbols might be accessed from other places:
extern int global_lib_variable;
void global_lib_function();
const char* other_lib_function(int my_argument);
int global_lib_variable = 1234;
void global_lib_function()