diff --git a/shell/platform/linux/fl_method_call.cc b/shell/platform/linux/fl_method_call.cc index 67e468c2c1ed2..2cc96e01002fa 100644 --- a/shell/platform/linux/fl_method_call.cc +++ b/shell/platform/linux/fl_method_call.cc @@ -74,9 +74,9 @@ G_MODULE_EXPORT FlValue* fl_method_call_get_args(FlMethodCall* self) { return self->args; } -gboolean fl_method_call_respond(FlMethodCall* self, - FlMethodResponse* response, - GError** error) { +G_MODULE_EXPORT gboolean fl_method_call_respond(FlMethodCall* self, + FlMethodResponse* response, + GError** error) { g_return_val_if_fail(FL_IS_METHOD_CALL(self), FALSE); g_return_val_if_fail(FL_IS_METHOD_RESPONSE(response), FALSE); return fl_method_channel_respond(self->channel, self->response_handle, diff --git a/shell/platform/linux/fl_method_response.cc b/shell/platform/linux/fl_method_response.cc index cc0964b1223b0..5bd1d85252e12 100644 --- a/shell/platform/linux/fl_method_response.cc +++ b/shell/platform/linux/fl_method_response.cc @@ -26,6 +26,9 @@ struct _FlMethodNotImplementedResponse { FlMethodResponse parent_instance; }; +// Added here to stop the compiler from optimising this function away. +G_MODULE_EXPORT GType fl_method_response_get_type(); + G_DEFINE_TYPE(FlMethodResponse, fl_method_response, G_TYPE_OBJECT) G_DEFINE_TYPE(FlMethodSuccessResponse, fl_method_success_response, diff --git a/shell/platform/linux/fl_plugin_registrar.cc b/shell/platform/linux/fl_plugin_registrar.cc index 9b01bedc6d378..093a16e0e9bd5 100644 --- a/shell/platform/linux/fl_plugin_registrar.cc +++ b/shell/platform/linux/fl_plugin_registrar.cc @@ -17,6 +17,9 @@ struct _FlPluginRegistrar { FlBinaryMessenger* messenger; }; +// Added here to stop the compiler from optimising this function away. +G_MODULE_EXPORT GType fl_plugin_registrar_get_type(); + G_DEFINE_TYPE(FlPluginRegistrar, fl_plugin_registrar, G_TYPE_OBJECT) static void view_weak_notify_cb(gpointer user_data, GObject* object) {