diff options
author | Ben Wiederhake <BenWiederhake.GitHub@gmx.de> | 2020-08-11 23:59:15 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-08-12 20:40:59 +0200 |
commit | b493c6cd39ebbb3d2cda6530075f3236848f8500 (patch) | |
tree | c4e1b1901831088e77feee5788528cffc8b5bd49 | |
parent | 9e1ed4bb0512ea19a1a3e1754955e44f707c41ec (diff) | |
download | serenity-b493c6cd39ebbb3d2cda6530075f3236848f8500.zip |
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.
-rw-r--r-- | Demos/DynamicLink/LinkLib/DynamicLib.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Demos/DynamicLink/LinkLib/DynamicLib.cpp b/Demos/DynamicLink/LinkLib/DynamicLib.cpp index 0b92684c36..547a206468 100644 --- a/Demos/DynamicLink/LinkLib/DynamicLib.cpp +++ b/Demos/DynamicLink/LinkLib/DynamicLib.cpp @@ -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() |