changeset 29233:665c9ed14c97

Set API tags in files in libinterp/corefcn (patch #8919). Add API tag to (template) class definitions. Add API tag to (un-defined) functions and member functions in headers. Export template function instantiations from .cc files.
author Markus Mützel <markus.muetzel@gmx.de>
date Tue, 29 Dec 2020 18:15:36 +0100
parents 7bd81f266c21
children 853e60367cb6
files libinterp/corefcn/cdisplay.h libinterp/corefcn/error.h libinterp/corefcn/errwarn.h libinterp/corefcn/event-manager.h libinterp/corefcn/graphics.in.h libinterp/corefcn/gtk-manager.h libinterp/corefcn/interpreter-private.h libinterp/corefcn/load-save.h libinterp/corefcn/ls-hdf5.h libinterp/corefcn/ls-mat-ascii.h libinterp/corefcn/ls-mat4.h libinterp/corefcn/ls-mat5.h libinterp/corefcn/ls-utils.h libinterp/corefcn/mxarray.h libinterp/corefcn/oct-hist.h libinterp/corefcn/oct-process.cc libinterp/corefcn/oct-process.h libinterp/corefcn/oct-stream.cc libinterp/corefcn/oct-stream.h libinterp/corefcn/pager.h libinterp/corefcn/pr-flt-fmt.h libinterp/corefcn/syminfo.h
diffstat 22 files changed, 856 insertions(+), 702 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/cdisplay.h	Tue Dec 29 18:06:37 2020 +0100
+++ b/libinterp/corefcn/cdisplay.h	Tue Dec 29 18:15:36 2020 +0100
@@ -32,7 +32,7 @@
 extern "C" {
 #endif
 
-OCTINTERP_API extern const char *
+extern OCTINTERP_API const char *
 octave_get_display_info (const char *dpy_name, int *ht, int *wd, int *dp,
                          double *rx, double *ry, int *dpy_avail);
 
--- a/libinterp/corefcn/error.h	Tue Dec 29 18:06:37 2020 +0100
+++ b/libinterp/corefcn/error.h	Tue Dec 29 18:15:36 2020 +0100
@@ -48,7 +48,7 @@
   {
   public:
 
-    error_system (interpreter& interp);
+    OCTINTERP_API error_system (interpreter& interp);
 
     error_system (const error_system&) = delete;
 
@@ -56,7 +56,8 @@
 
     ~error_system (void) = default;
 
-    octave_value debug_on_error (const octave_value_list& args, int nargout);
+    OCTINTERP_API octave_value
+    debug_on_error (const octave_value_list& args, int nargout);
 
     void set_debug_on_error (bool flag) { m_debug_on_error = flag; }
 
@@ -69,7 +70,8 @@
       return val;
     }
 
-    octave_value debug_on_caught (const octave_value_list& args, int nargout);
+    OCTINTERP_API octave_value
+    debug_on_caught (const octave_value_list& args, int nargout);
 
     void set_debug_on_caught (bool flag) { m_debug_on_caught = flag; }
 
@@ -82,7 +84,8 @@
       return val;
     }
 
-    octave_value debug_on_warning (const octave_value_list& args, int nargout);
+    OCTINTERP_API octave_value
+    debug_on_warning (const octave_value_list& args, int nargout);
 
     void set_debug_on_warning (bool flag) { m_debug_on_warning = flag; }
 
@@ -95,12 +98,18 @@
       return val;
     }
 
-    octave_value discard_warning_messages (const octave_value_list& args,
-                                           int nargout);
+    OCTINTERP_API octave_value
+    discard_warning_messages (const octave_value_list& args, int nargout);
 
-    void set_discard_warning_messages (bool flag) { m_discard_warning_messages = flag; }
+    void set_discard_warning_messages (bool flag)
+    {
+      m_discard_warning_messages = flag;
+    }
 
-    bool discard_warning_messages (void) const { return m_discard_warning_messages; }
+    bool discard_warning_messages (void) const
+    {
+      return m_discard_warning_messages;
+    }
 
     bool discard_warning_messages (bool flag)
     {
@@ -109,7 +118,8 @@
       return val;
     }
 
-    octave_value beep_on_error (const octave_value_list& args, int nargout);
+    OCTINTERP_API octave_value
+    beep_on_error (const octave_value_list& args, int nargout);
 
     void set_beep_on_error (bool flag) { m_beep_on_error = flag; }
 
@@ -122,7 +132,8 @@
       return val;
     }
 
-    octave_value backtrace_on_warning (const octave_value_list& args, int nargout);
+    OCTINTERP_API octave_value
+    backtrace_on_warning (const octave_value_list& args, int nargout);
 
     void set_backtrace_on_warning (bool flag) { m_backtrace_on_warning = flag; }
 
@@ -135,7 +146,8 @@
       return val;
     }
 
-    octave_value verbose_warning (const octave_value_list& args, int nargout);
+    OCTINTERP_API octave_value
+    verbose_warning (const octave_value_list& args, int nargout);
 
     void set_verbose_warning (bool flag) { m_verbose_warning = flag; }
 
@@ -148,7 +160,8 @@
       return val;
     }
 
-    octave_value quiet_warning (const octave_value_list& args, int nargout);
+    OCTINTERP_API octave_value
+    quiet_warning (const octave_value_list& args, int nargout);
 
     void set_quiet_warning (bool flag) { m_quiet_warning = flag; }
 
@@ -172,9 +185,13 @@
       return val;
     }
 
-    octave_value last_error_message (const octave_value_list& args, int nargout);
+    OCTINTERP_API octave_value
+    last_error_message (const octave_value_list& args, int nargout);
 
-    void set_last_error_message (const std::string& val) { m_last_error_message = val; }
+    void set_last_error_message (const std::string& val)
+    {
+      m_last_error_message = val;
+    }
 
     std::string last_error_message (void) const { return m_last_error_message; }
 
@@ -185,7 +202,8 @@
       return val;
     }
 
-    octave_value last_warning_message (const octave_value_list& args, int nargout);
+    OCTINTERP_API octave_value
+    last_warning_message (const octave_value_list& args, int nargout);
 
     void set_last_warning_message (const std::string& val) { m_last_warning_message = val; }
 
@@ -198,7 +216,8 @@
       return val;
     }
 
-    octave_value last_warning_id (const octave_value_list& args, int nargout);
+    OCTINTERP_API octave_value
+    last_warning_id (const octave_value_list& args, int nargout);
 
     void set_last_warning_id (const std::string& val) { m_last_warning_id = val; }
 
@@ -211,7 +230,8 @@
       return val;
     }
 
-    octave_value last_error_id (const octave_value_list& args, int nargout);
+    OCTINTERP_API octave_value
+    last_error_id (const octave_value_list& args, int nargout);
 
     void set_last_error_id (const std::string& val) { m_last_error_id = val; }
 
@@ -238,78 +258,84 @@
       return val;
     }
 
-    static octave_map
+    static OCTINTERP_API octave_map
     make_stack_map (const std::list<frame_info>& frames);
 
-    static std::list<frame_info>
+    static OCTINTERP_API std::list<frame_info>
     make_stack_frame_list (const octave_map& stack);
 
     //! For given warning ID, return 0 if warnings are disabled, 1 if
     //! enabled, and 2 if the given ID should be an error instead of a
     //! warning.
 
-    int warning_enabled (const std::string& id);
+    OCTINTERP_API int warning_enabled (const std::string& id);
 
-    void verror (bool save_last_error, std::ostream& os, const char *name,
-                 const char *id, const char *fmt, va_list args,
-                 bool with_cfn = false);
+    OCTINTERP_API void
+    verror (bool save_last_error, std::ostream& os, const char *name,
+            const char *id, const char *fmt, va_list args,
+            bool with_cfn = false);
 
-    void vwarning (const char *name, const char *id, const char *fmt,
-                   va_list args);
+    OCTINTERP_API void
+    vwarning (const char *name, const char *id, const char *fmt,
+              va_list args);
 
     OCTAVE_NORETURN
-    void error_1 (execution_exception& ee, const char *id, const char *fmt,
-                  va_list args);
+    OCTINTERP_API void
+    error_1 (execution_exception& ee, const char *id, const char *fmt,
+             va_list args);
 
     OCTAVE_NORETURN
-    void error_1 (const char *id, const char *fmt, va_list args);
+    OCTINTERP_API void error_1 (const char *id, const char *fmt, va_list args);
 
     OCTAVE_NORETURN
-    void vusage (const char *id, const char *fmt, va_list args);
+    OCTINTERP_API void vusage (const char *id, const char *fmt, va_list args);
 
-    void vwarning (const char *id, const char *fmt, va_list args);
+    OCTINTERP_API void vwarning (const char *id, const char *fmt, va_list args);
 
     OCTAVE_NORETURN
-    void rethrow_error (const std::string& id, const std::string& msg,
-                        const octave_map& stack);
+    OCTINTERP_API void
+    rethrow_error (const std::string& id, const std::string& msg,
+                   const octave_map& stack);
 
     OCTAVE_NORETURN
-    void vpanic (const char *fmt, va_list args);
+    OCTINTERP_API void vpanic (const char *fmt, va_list args);
 
     OCTAVE_NORETURN
-    void panic (const char *fmt, ...);
+    OCTINTERP_API void panic (const char *fmt, ...);
 
-    octave_scalar_map warning_query (const std::string& id_arg);
+    OCTINTERP_API octave_scalar_map warning_query (const std::string& id_arg);
 
-    std::string default_warning_state (void);
+    OCTINTERP_API std::string default_warning_state (void);
 
-    void display_warning_options (std::ostream& os);
+    OCTINTERP_API void display_warning_options (std::ostream& os);
 
-    void set_warning_option (const std::string& state, const std::string& id);
-
-    void disable_warning (const std::string& id);
+    OCTINTERP_API void
+    set_warning_option (const std::string& state, const std::string& id);
 
-    void initialize_default_warning_state (void);
+    OCTINTERP_API void disable_warning (const std::string& id);
 
-    void interpreter_try (unwind_protect& frame);
+    OCTINTERP_API void initialize_default_warning_state (void);
+
+    OCTINTERP_API void interpreter_try (unwind_protect& frame);
 
     // Throw execution_exception or, if debug_on_error is TRUE, enter
     // debugger.  If stack_info is empty, use current call stack.
 
     OCTAVE_NORETURN
-    void throw_error (const std::string& err_type,
-                      const std::string& id,
-                      const std::string& message,
-                      const std::list<frame_info>& stack_info
-                        = std::list<frame_info> ());
+    OCTINTERP_API void
+    throw_error (const std::string& err_type,
+                 const std::string& id,
+                 const std::string& message,
+                 const std::list<frame_info>& stack_info
+                 = std::list<frame_info> ());
 
     OCTAVE_NORETURN
-    void throw_error (execution_exception& ee);
+    OCTINTERP_API void throw_error (execution_exception& ee);
 
-    void save_exception (const execution_exception& ee);
+    OCTINTERP_API void save_exception (const execution_exception& ee);
 
-    void display_exception (const execution_exception& ee,
-                            std::ostream& os) const;
+    OCTINTERP_API void
+    display_exception (const execution_exception& ee, std::ostream& os) const;
 
   private:
 
--- a/libinterp/corefcn/errwarn.h	Tue Dec 29 18:06:37 2020 +0100
+++ b/libinterp/corefcn/errwarn.h	Tue Dec 29 18:15:36 2020 +0100
@@ -42,150 +42,150 @@
 // Alphabetized list of common errors and warnings.
 ////////////////////////////////////////////////////////////////////////////////
 
-OCTAVE_NORETURN OCTINTERP_API extern void
+OCTAVE_NORETURN extern OCTINTERP_API void
 err_2_or_3_dim_plot (void);
 
-OCTAVE_NORETURN OCTINTERP_API extern void
+OCTAVE_NORETURN extern OCTINTERP_API void
 err_data_conversion (const char *from, const char *to);
 
-OCTAVE_NORETURN OCTINTERP_API extern void
+OCTAVE_NORETURN extern OCTINTERP_API void
 err_disabled_feature (const std::string& fcn, const std::string& feature,
                       const std::string& pkg = "Octave");
 
-OCTAVE_NORETURN OCTINTERP_API extern void
+OCTAVE_NORETURN extern OCTINTERP_API void
 err_indexed_cs_list (void);
 
-OCTAVE_NORETURN OCTINTERP_API extern void
+OCTAVE_NORETURN extern OCTINTERP_API void
 err_invalid_conversion (const std::string& from, const std::string& to);
 
-OCTAVE_NORETURN OCTINTERP_API extern void
+OCTAVE_NORETURN extern OCTINTERP_API void
 err_invalid_inquiry_subscript (void);
 
-OCTAVE_NORETURN OCTINTERP_API extern void
+OCTAVE_NORETURN extern OCTINTERP_API void
 err_invalid_structure_assignment (void);
 
-OCTAVE_NORETURN OCTINTERP_API extern void
+OCTAVE_NORETURN extern OCTINTERP_API void
 err_nonbraced_cs_list_assignment (void);
 
-OCTAVE_NORETURN OCTINTERP_API extern void
+OCTAVE_NORETURN extern OCTINTERP_API void
 err_nonconformant (void);
 
-OCTAVE_NORETURN OCTINTERP_API extern void
+OCTAVE_NORETURN extern OCTINTERP_API void
 err_nonconformant (octave_idx_type r1, octave_idx_type c1,
                    octave_idx_type r2, octave_idx_type c2);
 
-OCTAVE_NORETURN OCTINTERP_API extern void
+OCTAVE_NORETURN extern OCTINTERP_API void
 err_not_implemented (const char *);
 
-OCTAVE_NORETURN OCTINTERP_API extern void
+OCTAVE_NORETURN extern OCTINTERP_API void
 err_range_invalid (void);
 
-OCTAVE_NORETURN OCTINTERP_API extern void
+OCTAVE_NORETURN extern OCTINTERP_API void
 err_square_matrix_required (const char *fcn, const char *name);
 
-OCTAVE_NORETURN OCTINTERP_API extern void
+OCTAVE_NORETURN extern OCTINTERP_API void
 err_string_invalid (void);
 
-OCTAVE_NORETURN OCTINTERP_API extern void
+OCTAVE_NORETURN extern OCTINTERP_API void
 err_unrecognized_data_fmt (const char *name);
 
-OCTAVE_NORETURN OCTINTERP_API extern void
+OCTAVE_NORETURN extern OCTINTERP_API void
 err_unrecognized_float_fmt (void);
 
-OCTAVE_NORETURN OCTINTERP_API extern void
+OCTAVE_NORETURN extern OCTINTERP_API void
 err_user_returned_invalid (const char *name);
 
-OCTAVE_NORETURN OCTINTERP_API extern void
+OCTAVE_NORETURN extern OCTINTERP_API void
 err_user_supplied_eval (const char *name);
 
-OCTAVE_NORETURN OCTINTERP_API extern void
+OCTAVE_NORETURN extern OCTINTERP_API void
 err_user_supplied_eval (octave::execution_exception& ee, const char *name);
 
-OCTAVE_NORETURN OCTINTERP_API extern void
+OCTAVE_NORETURN extern OCTINTERP_API void
 err_wrong_type_arg (const char *name, const char *s);
 
-OCTAVE_NORETURN OCTINTERP_API extern void
+OCTAVE_NORETURN extern OCTINTERP_API void
 err_wrong_type_arg (octave::execution_exception& ee, const char *name,
                     const char *s);
 
-OCTAVE_NORETURN OCTINTERP_API extern void
+OCTAVE_NORETURN extern OCTINTERP_API void
 err_wrong_type_arg (const char *name, const std::string& s);
 
-OCTAVE_NORETURN OCTINTERP_API extern void
+OCTAVE_NORETURN extern OCTINTERP_API void
 err_wrong_type_arg (octave::execution_exception& ee, const char *name,
                     const std::string& s);
 
-OCTAVE_NORETURN OCTINTERP_API extern void
+OCTAVE_NORETURN extern OCTINTERP_API void
 err_wrong_type_arg (const char *name, const octave_value& tc);
 
-OCTAVE_NORETURN OCTINTERP_API extern void
+OCTAVE_NORETURN extern OCTINTERP_API void
 err_wrong_type_arg (octave::execution_exception& ee, const char *name,
                     const octave_value& tc);
 
-OCTAVE_NORETURN OCTINTERP_API extern void
+OCTAVE_NORETURN extern OCTINTERP_API void
 err_wrong_type_arg (const std::string& name, const octave_value& tc);
 
-OCTAVE_NORETURN OCTINTERP_API extern void
+OCTAVE_NORETURN extern OCTINTERP_API void
 err_wrong_type_arg (octave::execution_exception& ee, const std::string& name,
                     const octave_value& tc);
 
-OCTAVE_NORETURN OCTINTERP_API extern void
+OCTAVE_NORETURN extern OCTINTERP_API void
 err_wrong_type_arg (const char *s);
 
-OCTAVE_NORETURN OCTINTERP_API extern void
+OCTAVE_NORETURN extern OCTINTERP_API void
 err_wrong_type_arg (octave::execution_exception& ee, const char *s);
 
-OCTAVE_NORETURN OCTINTERP_API extern void
+OCTAVE_NORETURN extern OCTINTERP_API void
 err_wrong_type_arg (const std::string& s);
 
-OCTAVE_NORETURN OCTINTERP_API extern void
+OCTAVE_NORETURN extern OCTINTERP_API void
 err_wrong_type_arg (octave::execution_exception& ee, const std::string& s);
 
-OCTAVE_NORETURN OCTINTERP_API extern void
+OCTAVE_NORETURN extern OCTINTERP_API void
 err_wrong_type_arg (const octave_value& tc);
 
-OCTAVE_NORETURN OCTINTERP_API extern void
+OCTAVE_NORETURN extern OCTINTERP_API void
 err_wrong_type_arg (octave::execution_exception& ee, const octave_value& tc);
 
-OCTAVE_NORETURN OCTINTERP_API extern void
+OCTAVE_NORETURN extern OCTINTERP_API void
 err_wrong_type_arg_for_binary_op (const octave_value& op);
 
-OCTAVE_NORETURN OCTINTERP_API extern void
+OCTAVE_NORETURN extern OCTINTERP_API void
 err_wrong_type_arg_for_unary_op (const octave_value& op);
 
-OCTINTERP_API extern void
+extern OCTINTERP_API void
 warn_array_as_logical (const dim_vector& dv);
 
-OCTINTERP_API extern void
+extern OCTINTERP_API void
 warn_complex_cmp (void);
 
-OCTINTERP_API extern void
+extern OCTINTERP_API void
 warn_data_file_in_path (const std::string& fcn, const std::string& file);
 
-OCTINTERP_API extern void
+extern OCTINTERP_API void
 warn_disabled_feature (const std::string& fcn, const std::string& feature,
                        const std::string& pkg = "Octave");
 
-OCTINTERP_API extern void
+extern OCTINTERP_API void
 warn_empty_arg (const char *name);
 
-OCTINTERP_API extern void
+extern OCTINTERP_API void
 warn_empty_index (const std::string& type_name);
 
-OCTINTERP_API extern void
+extern OCTINTERP_API void
 warn_implicit_conversion (const char *id, const char *from, const char *to);
 
-OCTINTERP_API extern void
+extern OCTINTERP_API void
 warn_implicit_conversion (const std::string& id, const std::string& from,
                           const std::string& to);
 
-OCTINTERP_API extern void
+extern OCTINTERP_API void
 warn_invalid_value_specified (const char *name);
 
-OCTINTERP_API extern void
+extern OCTINTERP_API void
 warn_logical_conversion (void);
 
-OCTINTERP_API extern void
+extern OCTINTERP_API void
 warn_wrong_type_arg (const char *name, const octave_value& tc);
 
 #if defined (OCTAVE_USE_DEPRECATED_FUNCTIONS)
--- a/libinterp/corefcn/event-manager.h	Tue Dec 29 18:06:37 2020 +0100
+++ b/libinterp/corefcn/event-manager.h	Tue Dec 29 18:15:36 2020 +0100
@@ -255,7 +255,7 @@
   {
   public:
 
-    event_manager (interpreter& interp);
+    OCTINTERP_API event_manager (interpreter& interp);
 
     // No copying!
 
@@ -270,9 +270,10 @@
     // class interpreter_events, or nullptr to disconnect and delete the
     // previous link.
 
-    void connect_link (const std::shared_ptr<interpreter_events>& obj);
+    OCTINTERP_API void
+    connect_link (const std::shared_ptr<interpreter_events>& obj);
 
-    bool enable (void);
+    OCTINTERP_API bool enable (void);
 
     bool disable (void)
     {
@@ -289,9 +290,9 @@
     // If disable is TRUE, then no additional events will be processed
     // other than exit.
 
-    void process_events (bool disable = false);
+    OCTINTERP_API void process_events (bool disable = false);
 
-    void discard_events (void);
+    OCTINTERP_API void discard_events (void);
 
     // The post_event and post_exception functions provide a thread-safe
     // way for the GUI to queue interpreter functions for execution.
@@ -543,7 +544,7 @@
         instance->file_renamed (load_new);
     }
 
-    void set_workspace (void);
+    OCTINTERP_API void set_workspace (void);
 
     void set_workspace (bool top_level, const symbol_info_list& syminfo,
                         bool update_variable_editor = true)
--- a/libinterp/corefcn/graphics.in.h	Tue Dec 29 18:06:37 2020 +0100
+++ b/libinterp/corefcn/graphics.in.h	Tue Dec 29 18:15:36 2020 +0100
@@ -60,7 +60,7 @@
 
 // ---------------------------------------------------------------------
 
-class base_scaler
+class OCTINTERP_API base_scaler
 {
 public:
   base_scaler (void) { }
@@ -152,7 +152,7 @@
   }
 };
 
-class neg_log_scaler : public base_scaler
+class OCTINTERP_API neg_log_scaler : public base_scaler
 {
 public:
   neg_log_scaler (void) { }
@@ -192,7 +192,7 @@
   }
 };
 
-class scaler
+class OCTINTERP_API scaler
 {
 public:
   scaler (void) : rep (new base_scaler ()) { }
@@ -268,7 +268,7 @@
 
 // ---------------------------------------------------------------------
 
-class property;
+class OCTINTERP_API property;
 
 // FIXME: These values should probably be defined inside a namespace or
 // class, but which one is most appropriate?  For now, prefix with
@@ -277,7 +277,7 @@
 
 enum listener_mode { GCB_POSTSET, GCB_PERSISTENT, GCB_PREDELETE };
 
-class base_property
+class OCTINTERP_API base_property
 {
 public:
   friend class property;
@@ -430,7 +430,7 @@
 
 // ---------------------------------------------------------------------
 
-class string_property : public base_property
+class OCTINTERP_API string_property : public base_property
 {
 public:
   string_property (const std::string& s, const graphics_handle& h,
@@ -476,7 +476,7 @@
 
 // ---------------------------------------------------------------------
 
-class string_array_property : public base_property
+class OCTINTERP_API string_array_property : public base_property
 {
 public:
   enum desired_enum { string_t, cell_t };
@@ -676,7 +676,7 @@
 
 // ---------------------------------------------------------------------
 
-class text_label_property : public base_property
+class OCTINTERP_API text_label_property : public base_property
 {
 public:
   enum type { char_t, cellstr_t };
@@ -838,7 +838,7 @@
 
 // ---------------------------------------------------------------------
 
-class radio_values
+class OCTINTERP_API radio_values
 {
 public:
   OCTINTERP_API radio_values (const std::string& opt_string = "");
@@ -908,9 +908,9 @@
       return false;
   }
 
-  std::string values_as_string (void) const;
-
-  Cell values_as_cell (void) const;
+  OCTINTERP_API std::string values_as_string (void) const;
+
+  OCTINTERP_API Cell values_as_cell (void) const;
 
   octave_idx_type nelem (void) const { return possible_vals.size (); }
 
@@ -920,7 +920,7 @@
   std::set<caseless_str> possible_vals;
 };
 
-class radio_property : public base_property
+class OCTINTERP_API radio_property : public base_property
 {
 public:
   radio_property (const std::string& nm, const graphics_handle& h,
@@ -997,7 +997,7 @@
 
 // ---------------------------------------------------------------------
 
-class color_values
+class OCTINTERP_API color_values
 {
 public:
   color_values (double r = 0, double g = 0, double b = 1)
@@ -1058,7 +1058,7 @@
   OCTINTERP_API bool str2rgb (const std::string& str);
 };
 
-class color_property : public base_property
+class OCTINTERP_API color_property : public base_property
 {
 public:
   color_property (const color_values& c, const radio_values& v)
@@ -1172,7 +1172,7 @@
   NOT_NAN,
   NOT_INF
 };
-class double_property : public base_property
+class OCTINTERP_API double_property : public base_property
 {
 public:
   double_property (const std::string& nm, const graphics_handle& h,
@@ -1284,7 +1284,7 @@
 
 // ---------------------------------------------------------------------
 
-class double_radio_property : public base_property
+class OCTINTERP_API double_radio_property : public base_property
 {
 public:
   double_radio_property (double d, const radio_values& v)
@@ -1366,7 +1366,7 @@
 
 // ---------------------------------------------------------------------
 
-class array_property : public base_property
+class OCTINTERP_API array_property : public base_property
 {
 public:
   array_property (void)
@@ -1497,7 +1497,7 @@
   std::pair<double, bool> minval, maxval;
 };
 
-class row_vector_property : public array_property
+class OCTINTERP_API row_vector_property : public array_property
 {
 public:
   row_vector_property (const std::string& nm, const graphics_handle& h,
@@ -1591,7 +1591,7 @@
 
 // ---------------------------------------------------------------------
 
-class bool_property : public radio_property
+class OCTINTERP_API bool_property : public radio_property
 {
 public:
   bool_property (const std::string& nm, const graphics_handle& h,
@@ -1630,7 +1630,7 @@
 
 // ---------------------------------------------------------------------
 
-class handle_property : public base_property
+class OCTINTERP_API handle_property : public base_property
 {
 public:
   handle_property (const std::string& nm, const graphics_handle& h,
@@ -1675,7 +1675,7 @@
 
 // ---------------------------------------------------------------------
 
-class any_property : public base_property
+class OCTINTERP_API any_property : public base_property
 {
 public:
   any_property (const std::string& nm, const graphics_handle& h,
@@ -1708,7 +1708,7 @@
 
 // ---------------------------------------------------------------------
 
-class children_property : public base_property
+class OCTINTERP_API children_property : public base_property
 {
 public:
   children_property (void)
@@ -1863,7 +1863,7 @@
     children_list = val;
   }
 
-  Matrix do_get_children (bool return_hidden) const;
+  OCTINTERP_API Matrix do_get_children (bool return_hidden) const;
 
   Matrix do_get_all_children (void) const
   {
@@ -1899,7 +1899,7 @@
 
 // ---------------------------------------------------------------------
 
-class callback_property : public base_property
+class OCTINTERP_API callback_property : public base_property
 {
 public:
   callback_property (const std::string& nm, const graphics_handle& h,
@@ -1947,7 +1947,7 @@
 
 // ---------------------------------------------------------------------
 
-class property
+class OCTINTERP_API property
 {
 public:
   property (void) : rep (new base_property ("", graphics_handle ()))
@@ -2037,10 +2037,9 @@
   void run_listeners (listener_mode mode = GCB_POSTSET)
   { rep->run_listeners (mode); }
 
-  OCTINTERP_API static
-  property create (const std::string& name, const graphics_handle& parent,
-                   const caseless_str& type,
-                   const octave_value_list& args);
+  static OCTINTERP_API property
+  create (const std::string& name, const graphics_handle& parent,
+          const caseless_str& type, const octave_value_list& args);
 
   property clone (void) const
   { return property (rep->clone ()); }
@@ -2073,7 +2072,7 @@
 
 typedef std::pair<std::string, octave_value> pval_pair;
 
-class pval_vector : public std::vector<pval_pair>
+class OCTINTERP_API pval_vector : public std::vector<pval_pair>
 {
 public:
   const_iterator find (const std::string pname) const
@@ -2137,7 +2136,7 @@
 
 };
 
-class property_list
+class OCTINTERP_API property_list
 {
 public:
   typedef pval_vector pval_map_type;
@@ -2154,9 +2153,9 @@
 
   ~property_list (void) = default;
 
-  void set (const caseless_str& name, const octave_value& val);
-
-  octave_value lookup (const caseless_str& name) const;
+  OCTINTERP_API void set (const caseless_str& name, const octave_value& val);
+
+  OCTINTERP_API octave_value lookup (const caseless_str& name) const;
 
   plist_map_iterator begin (void) { return plist_map.begin (); }
   plist_map_const_iterator begin (void) const { return plist_map.begin (); }
@@ -2174,7 +2173,8 @@
     return plist_map.find (go_name);
   }
 
-  octave_scalar_map as_struct (const std::string& prefix_arg) const;
+  OCTINTERP_API octave_scalar_map
+  as_struct (const std::string& prefix_arg) const;
 
 private:
   plist_map_type plist_map;
@@ -2196,9 +2196,9 @@
 
   virtual std::string graphics_object_name (void) const { return "unknown"; }
 
-  void mark_modified (void);
-
-  void override_defaults (base_graphics_object& obj);
+  OCTINTERP_API void mark_modified (void);
+
+  OCTINTERP_API void override_defaults (base_graphics_object& obj);
 
   virtual void init_integerhandle (const octave_value&)
   {
@@ -2208,7 +2208,8 @@
   // Look through DEFAULTS for properties with given CLASS_NAME, and
   // apply them to the current object with set (virtual method).
 
-  void set_from_list (base_graphics_object& obj, property_list& defaults);
+  OCTINTERP_API void
+  set_from_list (base_graphics_object& obj, property_list& defaults);
 
   void insert_property (const std::string& name, property p)
   {
@@ -2287,7 +2288,7 @@
 
   void set_tag (const octave_value& val) { tag = val; }
 
-  void set_parent (const octave_value& val);
+  OCTINTERP_API void set_parent (const octave_value& val);
 
   Matrix get_children (void) const
   {
@@ -2304,9 +2305,10 @@
     return children.get_hidden ();
   }
 
-  void get_children_of_type (const caseless_str& type, bool get_invisible,
-                             bool traverse,
-                             std::list<graphics_object> &children_list) const;
+  OCTINTERP_API void
+  get_children_of_type (const caseless_str& type, bool get_invisible,
+                        bool traverse,
+                        std::list<graphics_object> &children_list) const;
 
   void set_modified (const octave_value& val) { set___modified__ (val); }
 
@@ -2351,7 +2353,7 @@
     parent = new_gh;
   }
 
-  static property_list::pval_map_type factory_defaults (void);
+  static OCTINTERP_API property_list::pval_map_type factory_defaults (void);
 
   // FIXME: These functions should be generated automatically by the
   //        genprops.awk script.
@@ -2370,22 +2372,23 @@
   virtual bool is_yliminclude (void) const { return false; }
   virtual bool is_zliminclude (void) const { return false; }
 
-  bool is_handle_visible (void) const;
-
-  std::set<std::string> dynamic_property_names (void) const;
-
-  bool has_dynamic_property (const std::string& pname) const;
+  OCTINTERP_API bool is_handle_visible (void) const;
+
+  OCTINTERP_API std::set<std::string> dynamic_property_names (void) const;
+
+  OCTINTERP_API bool has_dynamic_property (const std::string& pname) const;
 
 protected:
   std::set<std::string> dynamic_properties;
 
-  void set_dynamic (const caseless_str& pname, const octave_value& val);
-
-  octave_value get_dynamic (const caseless_str& pname) const;
-
-  octave_value get_dynamic (bool all = false) const;
-
-  property get_property_dynamic (const caseless_str& pname) const;
+  OCTINTERP_API void
+  set_dynamic (const caseless_str& pname, const octave_value& val);
+
+  OCTINTERP_API octave_value get_dynamic (const caseless_str& pname) const;
+
+  OCTINTERP_API octave_value get_dynamic (bool all = false) const;
+
+  OCTINTERP_API property get_property_dynamic (const caseless_str& pname) const;
 
   BEGIN_BASE_PROPERTIES
     // properties common to all objects
@@ -2744,15 +2747,15 @@
     rep->set (name, val);
   }
 
-  void set (const octave_value_list& args);
-
-  void set (const Array<std::string>& names, const Cell& values,
-            octave_idx_type row);
-
-  void set (const octave_map& m);
-
-  void set_value_or_default (const caseless_str& name,
-                             const octave_value& val);
+  OCTINTERP_API void set (const octave_value_list& args);
+
+  OCTINTERP_API void set (const Array<std::string>& names, const Cell& values,
+                          octave_idx_type row);
+
+  OCTINTERP_API void set (const octave_map& m);
+
+  OCTINTERP_API void set_value_or_default (const caseless_str& name,
+                                           const octave_value& val);
 
   void set_defaults (const std::string& mode) { rep->set_defaults (mode); }
 
@@ -2827,7 +2830,7 @@
 
   graphics_handle get_handle (void) const { return rep->get_handle (); }
 
-  graphics_object get_ancestor (const std::string& type) const;
+  OCTINTERP_API graphics_object get_ancestor (const std::string& type) const;
 
   void remove_child (const graphics_handle& h) { rep->remove_child (h); }
 
@@ -2901,7 +2904,8 @@
   bool is_handle_visible (void) const
   { return get_properties ().is_handle_visible (); }
 
-  octave::graphics_toolkit get_toolkit (void) const { return rep->get_toolkit (); }
+  octave::graphics_toolkit get_toolkit (void) const
+  { return rep->get_toolkit (); }
 
   void add_property_listener (const std::string& nm, const octave_value& v,
                               listener_mode mode = GCB_POSTSET)
@@ -2941,10 +2945,12 @@
   class OCTINTERP_API properties : public base_properties
   {
   public:
-    void remove_child (const graphics_handle& h, bool from_root = false);
-
-    Matrix get_boundingbox (bool internal = false,
-                            const Matrix& parent_pix_size = Matrix ()) const;
+    OCTINTERP_API void
+    remove_child (const graphics_handle& h, bool from_root = false);
+
+    OCTINTERP_API Matrix
+    get_boundingbox (bool internal = false,
+                     const Matrix& parent_pix_size = Matrix ()) const;
 
     // See the genprops.awk script for an explanation of the
     // properties declarations.
@@ -3086,7 +3092,7 @@
 
   bool valid_object (void) const { return true; }
 
-  void reset_default_properties (void);
+  OCTINTERP_API void reset_default_properties (void);
 
   bool has_readonly_property (const caseless_str& pname) const
   {
@@ -3102,7 +3108,8 @@
 
   property_list factory_properties;
 
-  static property_list::plist_map_type init_factory_properties (void);
+  static OCTINTERP_API property_list::plist_map_type
+  init_factory_properties (void);
 };
 
 // ---------------------------------------------------------------------
@@ -3110,6 +3117,7 @@
 class OCTINTERP_API figure : public base_graphics_object
 {
 public:
+
   class OCTINTERP_API properties : public base_properties
   {
   public:
@@ -3118,41 +3126,44 @@
       integerhandle = val;
     }
 
-    void remove_child (const graphics_handle& h, bool from_root = false);
-
-    void set_visible (const octave_value& val);
-
-    octave::graphics_toolkit get_toolkit (void) const;
-
-    void set_toolkit (const octave::graphics_toolkit& b);
-
-    void set___graphics_toolkit__ (const octave_value& val);
-
-    void adopt (const graphics_handle& h);
-
-    void set_position (const octave_value& val,
-                       bool do_notify_toolkit = true);
-
-    void set_outerposition (const octave_value& val,
-                            bool do_notify_toolkit = true);
-
-    Matrix bbox2position (const Matrix& bbox) const;
-
-    Matrix get_boundingbox (bool internal = false,
-                            const Matrix& parent_pix_size = Matrix ()) const;
-
-    void set_boundingbox (const Matrix& bb, bool internal = false,
-                          bool do_notify_toolkit = true);
-
-    Matrix map_from_boundingbox (double x, double y) const;
-
-    Matrix map_to_boundingbox (double x, double y) const;
-
-    void update_units (const caseless_str& old_units);
-
-    void update_paperunits (const caseless_str& old_paperunits);
-
-    std::string get_title (void) const;
+    OCTINTERP_API void
+    remove_child (const graphics_handle& h, bool from_root = false);
+
+    OCTINTERP_API void set_visible (const octave_value& val);
+
+    OCTINTERP_API octave::graphics_toolkit get_toolkit (void) const;
+
+    OCTINTERP_API void set_toolkit (const octave::graphics_toolkit& b);
+
+    OCTINTERP_API void set___graphics_toolkit__ (const octave_value& val);
+
+    OCTINTERP_API void adopt (const graphics_handle& h);
+
+    OCTINTERP_API void set_position (const octave_value& val,
+                                     bool do_notify_toolkit = true);
+
+    OCTINTERP_API void set_outerposition (const octave_value& val,
+                                          bool do_notify_toolkit = true);
+
+    OCTINTERP_API Matrix bbox2position (const Matrix& bbox) const;
+
+    OCTINTERP_API Matrix
+    get_boundingbox (bool internal = false,
+                     const Matrix& parent_pix_size = Matrix ()) const;
+
+    OCTINTERP_API void
+    set_boundingbox (const Matrix& bb, bool internal = false,
+                     bool do_notify_toolkit = true);
+
+    OCTINTERP_API Matrix map_from_boundingbox (double x, double y) const;
+
+    OCTINTERP_API Matrix map_to_boundingbox (double x, double y) const;
+
+    OCTINTERP_API void update_units (const caseless_str& old_units);
+
+    OCTINTERP_API void update_paperunits (const caseless_str& old_paperunits);
+
+    OCTINTERP_API std::string get_title (void) const;
 
     // See the genprops.awk script for an explanation of the
     // properties declarations.
@@ -3256,7 +3267,7 @@
     }
 
   private:
-    Matrix get_auto_paperposition (void);
+    OCTINTERP_API Matrix get_auto_paperposition (void);
 
     void update_paperpositionmode (void)
     {
@@ -3264,9 +3275,9 @@
         paperposition.set (get_auto_paperposition ());
     }
 
-    void update_handlevisibility (void);
-
-    void init_toolkit (void);
+    OCTINTERP_API void update_handlevisibility (void);
+
+    OCTINTERP_API void init_toolkit (void);
 
     octave::graphics_toolkit toolkit;
   };
@@ -3318,7 +3329,7 @@
     return retval;
   }
 
-  octave_value get_default (const caseless_str& name) const;
+  OCTINTERP_API octave_value get_default (const caseless_str& name) const;
 
   octave_value get_defaults (void) const
   {
@@ -3336,7 +3347,7 @@
 
   bool valid_object (void) const { return true; }
 
-  void reset_default_properties (void);
+  OCTINTERP_API void reset_default_properties (void);
 
   bool has_readonly_property (const caseless_str& pname) const
   {
@@ -3355,6 +3366,7 @@
 class OCTINTERP_API graphics_xform
 {
 public:
+
   graphics_xform (void)
     : xform (xform_eye ()), xform_inv (xform_eye ()),
       sx ("linear"), sy ("linear"), sz ("linear"),  zlim (1, 2, 0.0)
@@ -3385,15 +3397,15 @@
     return *this;
   }
 
-  static ColumnVector xform_vector (double x, double y, double z);
-
-  static Matrix xform_eye (void);
-
-  ColumnVector transform (double x, double y, double z,
-                          bool use_scale = true) const;
-
-  ColumnVector untransform (double x, double y, double z,
-                            bool use_scale = true) const;
+  static OCTINTERP_API ColumnVector xform_vector (double x, double y, double z);
+
+  static OCTINTERP_API Matrix xform_eye (void);
+
+  OCTINTERP_API ColumnVector
+  transform (double x, double y, double z, bool use_scale = true) const;
+
+  OCTINTERP_API ColumnVector
+  untransform (double x, double y, double z, bool use_scale = true) const;
 
   ColumnVector untransform (double x, double y, bool use_scale = true) const
   { return untransform (x, y, (zlim(0)+zlim(1))/2, use_scale); }
@@ -3443,25 +3455,32 @@
 class OCTINTERP_API axes : public base_graphics_object
 {
 public:
+
   class OCTINTERP_API properties : public base_properties
   {
   public:
-    void set_defaults (base_graphics_object& obj, const std::string& mode);
-
-    void remove_child (const graphics_handle& h, bool from_root = false);
-
-    void adopt (const graphics_handle& h);
+
+    OCTINTERP_API void
+    set_defaults (base_graphics_object& obj, const std::string& mode);
+
+    OCTINTERP_API void
+    remove_child (const graphics_handle& h, bool from_root = false);
+
+    OCTINTERP_API void adopt (const graphics_handle& h);
 
     const scaler& get_x_scaler (void) const { return sx; }
     const scaler& get_y_scaler (void) const { return sy; }
     const scaler& get_z_scaler (void) const { return sz; }
 
-    Matrix get_boundingbox (bool internal = false,
-                            const Matrix& parent_pix_size = Matrix ()) const;
-    Matrix get_extent (bool with_text = false,
-                       bool only_text_height=false) const;
-
-    double get___fontsize_points__ (double box_pix_height = 0) const;
+    OCTINTERP_API Matrix
+    get_boundingbox (bool internal = false,
+                     const Matrix& parent_pix_size = Matrix ()) const;
+    OCTINTERP_API Matrix
+    get_extent (bool with_text = false,
+                bool only_text_height=false) const;
+
+    OCTINTERP_API double
+    get___fontsize_points__ (double box_pix_height = 0) const;
 
     void update_boundingbox (void)
     {
@@ -3472,9 +3491,9 @@
         }
     }
 
-    void update_camera (void);
-    void update_axes_layout (void);
-    void update_aspectratios (void);
+    OCTINTERP_API void update_camera (void);
+    OCTINTERP_API void update_axes_layout (void);
+    OCTINTERP_API void update_aspectratios (void);
     void update_transform (void)
     {
       update_aspectratios ();
@@ -3482,7 +3501,7 @@
       update_axes_layout ();
     }
 
-    void sync_positions (void);
+    OCTINTERP_API void sync_positions (void);
 
     // Redirect calls to "activepositionproperty" to "positionconstraint".
 
@@ -3521,11 +3540,11 @@
       set_position (val);
     }
 
-    void update_autopos (const std::string& elem_type);
-    void update_xlabel_position (void);
-    void update_ylabel_position (void);
-    void update_zlabel_position (void);
-    void update_title_position (void);
+    OCTINTERP_API void update_autopos (const std::string& elem_type);
+    OCTINTERP_API void update_xlabel_position (void);
+    OCTINTERP_API void update_ylabel_position (void);
+    OCTINTERP_API void update_zlabel_position (void);
+    OCTINTERP_API void update_title_position (void);
 
     graphics_xform get_transform (void) const
     { return graphics_xform (x_render, x_render_inv, sx, sy, sz, x_zlim); }
@@ -3583,36 +3602,43 @@
     ColumnVector coord2pixel (double x, double y, double z) const
     { return get_transform ().transform (x, y, z); }
 
-    void zoom_about_point (const std::string& mode, double x, double y,
-                           double factor, bool push_to_zoom_stack = true);
-    void zoom (const std::string& mode, double factor,
-               bool push_to_zoom_stack = true);
-    void zoom (const std::string& mode, const Matrix& xl, const Matrix& yl,
-               bool push_to_zoom_stack = true);
-
-    void translate_view (const std::string& mode,
-                         double x0, double x1, double y0, double y1,
-                         bool push_to_zoom_stack = true);
-
-    void pan (const std::string& mode, double factor,
+    OCTINTERP_API void
+    zoom_about_point (const std::string& mode, double x, double y,
+                      double factor, bool push_to_zoom_stack = true);
+    OCTINTERP_API void
+    zoom (const std::string& mode, double factor,
+          bool push_to_zoom_stack = true);
+    OCTINTERP_API void
+    zoom (const std::string& mode, const Matrix& xl, const Matrix& yl,
+          bool push_to_zoom_stack = true);
+
+    OCTINTERP_API void
+    translate_view (const std::string& mode,
+                    double x0, double x1, double y0, double y1,
+                    bool push_to_zoom_stack = true);
+
+    OCTINTERP_API void
+    pan (const std::string& mode, double factor,
+         bool push_to_zoom_stack = true);
+
+    OCTINTERP_API void
+    rotate3d (double x0, double x1, double y0, double y1,
               bool push_to_zoom_stack = true);
 
-    void rotate3d (double x0, double x1, double y0, double y1,
-                   bool push_to_zoom_stack = true);
-
-    void rotate_view (double delta_az, double delta_el,
-                      bool push_to_zoom_stack = true);
-
-    void unzoom (void);
-    void update_handlevisibility (void);
-    void push_zoom_stack (void);
-    void clear_zoom_stack (bool do_unzoom = true);
-
-    void update_units (const caseless_str& old_units);
-
-    void update_font (std::string prop = "");
-
-    void update_fontunits (const caseless_str& old_fontunits);
+    OCTINTERP_API void
+    rotate_view (double delta_az, double delta_el,
+                 bool push_to_zoom_stack = true);
+
+    OCTINTERP_API void unzoom (void);
+    OCTINTERP_API void update_handlevisibility (void);
+    OCTINTERP_API void push_zoom_stack (void);
+    OCTINTERP_API void clear_zoom_stack (bool do_unzoom = true);
+
+    OCTINTERP_API void update_units (const caseless_str& old_units);
+
+    OCTINTERP_API void update_font (std::string prop = "");
+
+    OCTINTERP_API void update_fontunits (const caseless_str& old_fontunits);
 
     void increase_num_lights (void) { num_lights++; }
     void decrease_num_lights (void) { num_lights--; }
@@ -3680,10 +3706,12 @@
     // Text renderer, used for calculation of text (tick labels) size
     octave::text_renderer txt_renderer;
 
-    void set_text_child (handle_property& h, const std::string& who,
-                         const octave_value& v);
-
-    void delete_text_child (handle_property& h, bool from_root = false);
+    OCTINTERP_API void
+    set_text_child (handle_property& h, const std::string& who,
+                    const octave_value& v);
+
+    OCTINTERP_API void
+    delete_text_child (handle_property& h, bool from_root = false);
 
     // See the genprops.awk script for an explanation of the
     // properties declarations.
@@ -3843,7 +3871,7 @@
    END_PROPERTIES
 
   protected:
-    void init (void);
+    OCTINTERP_API void init (void);
 
   private:
 
@@ -3873,7 +3901,8 @@
       sz = get_scale (get_zscale (), zlim.get ().matrix_value ());
     }
 
-    void update_label_color (handle_property label, color_property col);
+    OCTINTERP_API void
+    update_label_color (handle_property label, color_property col);
     void update_xcolor (void)
     { update_label_color (xlabel, xcolor); }
 
@@ -4112,21 +4141,24 @@
       sync_positions ();
     }
 
-    void update_outerposition (void);
-    void update_position (void);
-    void update_looseinset (void);
-
-    double calc_tick_sep (double minval, double maxval);
-    void calc_ticks_and_lims (array_property& lims, array_property& ticks,
-                              array_property& mticks, bool limmode_is_auto,
-                              bool tickmode_is_auto, bool is_logscale);
-    void calc_ticklabels (const array_property& ticks, any_property& labels,
-                          bool is_logscale, const bool is_origin,
-                          const int other_axislocation,
-                          const array_property& axis_lims);
-    Matrix get_ticklabel_extents (const Matrix& ticks,
-                                  const string_vector& ticklabels,
-                                  const Matrix& limits);
+    OCTINTERP_API void update_outerposition (void);
+    OCTINTERP_API void update_position (void);
+    OCTINTERP_API void update_looseinset (void);
+
+    OCTINTERP_API double calc_tick_sep (double minval, double maxval);
+    OCTINTERP_API void
+    calc_ticks_and_lims (array_property& lims, array_property& ticks,
+                         array_property& mticks, bool limmode_is_auto,
+                         bool tickmode_is_auto, bool is_logscale);
+    OCTINTERP_API void
+    calc_ticklabels (const array_property& ticks, any_property& labels,
+                     bool is_logscale, const bool is_origin,
+                     const int other_axislocation,
+                     const array_property& axis_lims);
+    OCTINTERP_API Matrix
+    get_ticklabel_extents (const Matrix& ticks,
+                           const string_vector& ticklabels,
+                           const Matrix& limits);
 
     void fix_limits (array_property& lims)
     {
@@ -4148,7 +4180,7 @@
         }
     }
 
-    Matrix calc_tightbox (const Matrix& init_pos);
+    OCTINTERP_API Matrix calc_tightbox (const Matrix& init_pos);
 
     void set_colormap (const octave_value& val)
     {
@@ -4160,15 +4192,17 @@
       colormap.run_listeners (GCB_POSTSET);
     }
 
-    octave_value get_colormap (void) const;
+    OCTINTERP_API octave_value get_colormap (void) const;
 
   public:
-    Matrix get_axis_limits (double xmin, double xmax,
-                            double min_pos, double max_neg,
-                            const bool logscale);
-
-    void check_axis_limits (Matrix &limits, const Matrix kids,
-                            const bool logscale, char &update_type);
+    OCTINTERP_API Matrix
+    get_axis_limits (double xmin, double xmax,
+                     double min_pos, double max_neg,
+                     const bool logscale);
+
+    OCTINTERP_API void
+    check_axis_limits (Matrix &limits, const Matrix kids,
+                       const bool logscale, char &update_type);
 
     void update_xlim ()
     {
@@ -4287,7 +4321,7 @@
     return retval;
   }
 
-  octave_value get_default (const caseless_str& name) const;
+  OCTINTERP_API octave_value get_default (const caseless_str& name) const;
 
   octave_value get_defaults (void) const
   {
@@ -4303,14 +4337,14 @@
 
   const base_properties& get_properties (void) const { return xproperties; }
 
-  void update_axis_limits (const std::string& axis_type);
-
-  void update_axis_limits (const std::string& axis_type,
-                           const graphics_handle& h);
+  OCTINTERP_API void update_axis_limits (const std::string& axis_type);
+
+  OCTINTERP_API void update_axis_limits (const std::string& axis_type,
+                                         const graphics_handle& h);
 
   bool valid_object (void) const { return true; }
 
-  void reset_default_properties (void);
+  OCTINTERP_API void reset_default_properties (void);
 
   bool has_readonly_property (const caseless_str& pname) const
   {
@@ -4321,7 +4355,7 @@
   }
 
 protected:
-  void initialize (const graphics_object& go);
+  OCTINTERP_API void initialize (const graphics_object& go);
 
 private:
   property_list default_properties;
@@ -4332,9 +4366,11 @@
 class OCTINTERP_API line : public base_graphics_object
 {
 public:
+
   class OCTINTERP_API properties : public base_properties
   {
   public:
+
     // See the genprops.awk script for an explanation of the
     // properties declarations.
     // Programming note: Keep property list sorted if new ones are added.
@@ -4373,8 +4409,8 @@
     }
 
   private:
-    Matrix compute_xlim (void) const;
-    Matrix compute_ylim (void) const;
+    OCTINTERP_API Matrix compute_xlim (void) const;
+    OCTINTERP_API Matrix compute_ylim (void) const;
 
     void update_xdata (void) { set_xlim (compute_xlim ()); }
 
@@ -4413,14 +4449,17 @@
 class OCTINTERP_API text : public base_graphics_object
 {
 public:
+
   class OCTINTERP_API properties : public base_properties
   {
   public:
-    double get___fontsize_points__ (double box_pix_height = 0) const;
-
-    void update_text_extent (void);
-
-    void update_font (void);
+
+    OCTINTERP_API double
+    get___fontsize_points__ (double box_pix_height = 0) const;
+
+    OCTINTERP_API void update_text_extent (void);
+
+    OCTINTERP_API void update_font (void);
 
     void set_position (const octave_value& val)
     {
@@ -4488,8 +4527,8 @@
       double_property __fontsize_points__ hgr , 0
     END_PROPERTIES
 
-    Matrix get_data_position (void) const;
-    Matrix get_extent_matrix (void) const;
+    OCTINTERP_API Matrix get_data_position (void) const;
+    OCTINTERP_API Matrix get_extent_matrix (void) const;
     const uint8NDArray& get_pixels (void) const { return pixels; }
 
     // Text renderer, used for calculation of text size
@@ -4536,7 +4575,7 @@
         set_zliminclude ("off");
     }
 
-    void request_autopos (void);
+    OCTINTERP_API void request_autopos (void);
     void update_positionmode (void) { request_autopos (); }
     void update_rotationmode (void) { request_autopos (); }
     void update_horizontalalignmentmode (void) { request_autopos (); }
@@ -4568,8 +4607,8 @@
     void update_horizontalalignment (void) { update_text_extent (); }
     void update_verticalalignment (void) { update_text_extent (); }
 
-    void update_units (void);
-    void update_fontunits (const caseless_str& old_fontunits);
+    OCTINTERP_API void update_units (void);
+    OCTINTERP_API void update_fontunits (const caseless_str& old_fontunits);
 
   private:
     std::string cached_units;
@@ -4608,9 +4647,11 @@
 class OCTINTERP_API image : public base_graphics_object
 {
 public:
+
   class OCTINTERP_API properties : public base_properties
   {
   public:
+
     bool is_aliminclude (void) const
     { return (aliminclude.is_on () && alphadatamapping.is ("scaled")); }
     std::string get_aliminclude (void) const
@@ -4621,7 +4662,7 @@
     std::string get_climinclude (void) const
     { return climinclude.current_value (); }
 
-    octave_value get_color_data (void) const;
+    OCTINTERP_API octave_value get_color_data (void) const;
 
     void initialize_data (void) { update_cdata (); }
 
@@ -4821,6 +4862,7 @@
 class OCTINTERP_API light : public base_graphics_object
 {
 public:
+
   class OCTINTERP_API properties : public base_properties
   {
     // See the genprops.awk script for an explanation of the
@@ -4840,7 +4882,7 @@
     }
 
   private:
-    void update_visible (void);
+    OCTINTERP_API void update_visible (void);
   };
 
 private:
@@ -4868,7 +4910,7 @@
   }
 
 protected:
-  void initialize (const graphics_object& go);
+  OCTINTERP_API void initialize (const graphics_object& go);
 };
 
 // ---------------------------------------------------------------------
@@ -4876,9 +4918,11 @@
 class OCTINTERP_API patch : public base_graphics_object
 {
 public:
+
   class OCTINTERP_API properties : public base_properties
   {
   public:
+
     octave_value get_color_data (void) const;
 
     // Matlab allows incoherent data to be stored into patch properties.
@@ -4899,7 +4943,7 @@
     std::string get_climinclude (void) const
     { return climinclude.current_value (); }
 
-    bool get_do_lighting (void) const;
+    OCTINTERP_API bool get_do_lighting (void) const;
 
     std::vector<std::vector<octave_idx_type>> coplanar_last_idx;
 
@@ -5018,7 +5062,7 @@
 
     void update_facevertexcdata (void) { update_data ();}
 
-    void update_fvc (void);
+    OCTINTERP_API void update_fvc (void);
 
     void update_xdata (void)
     {
@@ -5077,11 +5121,11 @@
         clim = cdata.get_limits ();
     }
 
-    void update_data (void);
-
-    void calc_face_normals (Matrix& normals);
-    void update_face_normals (bool reset, bool force = false);
-    void update_vertex_normals (bool reset, bool force = false);
+    OCTINTERP_API void update_data (void);
+
+    OCTINTERP_API void calc_face_normals (Matrix& normals);
+    OCTINTERP_API void update_face_normals (bool reset, bool force = false);
+    OCTINTERP_API void update_vertex_normals (bool reset, bool force = false);
 
     void update_edgelighting (void)
     {
@@ -5135,10 +5179,10 @@
     return retval;
   }
 
-  void reset_default_properties (void);
+  OCTINTERP_API void reset_default_properties (void);
 
 protected:
-  void initialize (const graphics_object& go);
+  OCTINTERP_API void initialize (const graphics_object& go);
 
 };
 
@@ -5147,10 +5191,12 @@
 class OCTINTERP_API scatter : public base_graphics_object
 {
 public:
+
   class OCTINTERP_API properties : public base_properties
   {
   public:
-    octave_value get_color_data (void) const;
+
+    OCTINTERP_API octave_value get_color_data (void) const;
 
     // Matlab allows incoherent data to be stored in scatter properties.
     // The scatter object should then be ignored by the renderer.
@@ -5262,7 +5308,7 @@
     }
 
   public:
-    void update_color (void);
+    OCTINTERP_API void update_color (void);
 
   private:
     std::string bad_data_msg;
@@ -5370,7 +5416,7 @@
   }
 
 protected:
-  void initialize (const graphics_object& go);
+  OCTINTERP_API void initialize (const graphics_object& go);
 
 };
 
@@ -5379,9 +5425,11 @@
 class OCTINTERP_API surface : public base_graphics_object
 {
 public:
+
   class OCTINTERP_API properties : public base_properties
   {
   public:
+
     octave_value get_color_data (void) const;
 
     bool is_aliminclude (void) const
@@ -5394,7 +5442,7 @@
     std::string get_climinclude (void) const
     { return climinclude.current_value (); }
 
-    bool get_do_lighting (void) const;
+    OCTINTERP_API bool get_do_lighting (void) const;
 
     // See the genprops.awk script for an explanation of the
     // properties declarations.
@@ -5534,8 +5582,8 @@
       set_zlim (zdata.get_limits ());
     }
 
-    void update_face_normals (bool reset, bool force = false);
-    void update_vertex_normals (bool reset, bool force = false);
+    OCTINTERP_API void update_face_normals (bool reset, bool force = false);
+    OCTINTERP_API void update_vertex_normals (bool reset, bool force = false);
 
     void update_facenormalsmode (void)
     { update_face_normals (false); }
@@ -5587,12 +5635,15 @@
 class OCTINTERP_API hggroup : public base_graphics_object
 {
 public:
+
   class OCTINTERP_API properties : public base_properties
   {
   public:
-    void remove_child (const graphics_handle& h, bool from_root = false);
-
-    void adopt (const graphics_handle& h);
+
+    OCTINTERP_API void
+    remove_child (const graphics_handle& h, bool from_root = false);
+
+    OCTINTERP_API void adopt (const graphics_handle& h);
 
     // See the genprops.awk script for an explanation of the
     // properties declarations.
@@ -5615,9 +5666,9 @@
     END_PROPERTIES
 
   private:
-    void update_limits (void) const;
-
-    void update_limits (const graphics_handle& h) const;
+    OCTINTERP_API void update_limits (void) const;
+
+    OCTINTERP_API void update_limits (const graphics_handle& h) const;
 
   protected:
     void init (void)
@@ -5641,10 +5692,10 @@
 
   bool valid_object (void) const { return true; }
 
-  void update_axis_limits (const std::string& axis_type);
-
-  void update_axis_limits (const std::string& axis_type,
-                           const graphics_handle& h);
+  OCTINTERP_API void update_axis_limits (const std::string& axis_type);
+
+  OCTINTERP_API void update_axis_limits (const std::string& axis_type,
+                                         const graphics_handle& h);
 
   bool has_readonly_property (const caseless_str& pname) const
   {
@@ -5661,9 +5712,11 @@
 class OCTINTERP_API uimenu : public base_graphics_object
 {
 public:
+
   class OCTINTERP_API properties : public base_properties
   {
   public:
+
     void remove_child (const graphics_handle& h, bool from_root = false)
     {
       base_properties::remove_child (h, from_root);
@@ -5732,6 +5785,7 @@
 class OCTINTERP_API uicontextmenu : public base_graphics_object
 {
 public:
+
   class OCTINTERP_API properties : public base_properties
   {
   public:
@@ -5768,7 +5822,7 @@
     // List of objects that might depend on this uicontextmenu object
     std::list<graphics_handle> dependent_obj_list;
 
-    void update_beingdeleted (void);
+    OCTINTERP_API void update_beingdeleted (void);
 
   };
 
@@ -5803,13 +5857,17 @@
 class OCTINTERP_API uicontrol : public base_graphics_object
 {
 public:
+
   class OCTINTERP_API properties : public base_properties
   {
   public:
-    Matrix get_boundingbox (bool internal = false,
-                            const Matrix& parent_pix_size = Matrix ()) const;
-
-    double get___fontsize_points__ (double box_pix_height = 0) const;
+
+    OCTINTERP_API Matrix
+    get_boundingbox (bool internal = false,
+                     const Matrix& parent_pix_size = Matrix ()) const;
+
+    OCTINTERP_API double
+    get___fontsize_points__ (double box_pix_height = 0) const;
 
     // See the genprops.awk script for an explanation of the
     // properties declarations.
@@ -5864,7 +5922,7 @@
       cached_units = get_units ();
     }
 
-    void update_text_extent (void);
+    OCTINTERP_API void update_text_extent (void);
 
     void update_string (void) { update_text_extent (); }
     void update_fontname (void) { update_text_extent (); }
@@ -5875,9 +5933,9 @@
     }
     void update_fontweight (void) { update_text_extent (); }
 
-    void update_fontunits (const caseless_str& old_units);
-
-    void update_units (void);
+    OCTINTERP_API void update_fontunits (const caseless_str& old_units);
+
+    OCTINTERP_API void update_units (void);
 
   };
 
@@ -5911,17 +5969,22 @@
 class OCTINTERP_API uibuttongroup : public base_graphics_object
 {
 public:
+
   class OCTINTERP_API properties : public base_properties
   {
   public:
-    void remove_child (const graphics_handle& h, bool from_root = false);
-
-    void adopt (const graphics_handle& h);
-
-    Matrix get_boundingbox (bool internal = false,
-                            const Matrix& parent_pix_size = Matrix ()) const;
-
-    double get___fontsize_points__ (double box_pix_height = 0) const;
+
+    OCTINTERP_API void
+    remove_child (const graphics_handle& h, bool from_root = false);
+
+    OCTINTERP_API void adopt (const graphics_handle& h);
+
+    OCTINTERP_API Matrix
+    get_boundingbox (bool internal = false,
+                     const Matrix& parent_pix_size = Matrix ()) const;
+
+    OCTINTERP_API double
+    get___fontsize_points__ (double box_pix_height = 0) const;
 
     // See the genprops.awk script for an explanation of the
     // properties declarations.
@@ -5971,8 +6034,8 @@
     // void update_fontangle (void) { update_text_extent (); }
     // void update_fontweight (void) { update_fontweight (); }
 
-    void update_units (const caseless_str& old_units);
-    void update_fontunits (const caseless_str& old_units);
+    OCTINTERP_API void update_units (const caseless_str& old_units);
+    OCTINTERP_API void update_fontunits (const caseless_str& old_units);
 
   };
 
@@ -6007,13 +6070,17 @@
 class OCTINTERP_API uipanel : public base_graphics_object
 {
 public:
+
   class OCTINTERP_API properties : public base_properties
   {
   public:
-    Matrix get_boundingbox (bool internal = false,
-                            const Matrix& parent_pix_size = Matrix ()) const;
-
-    double get___fontsize_points__ (double box_pix_height = 0) const;
+
+    OCTINTERP_API Matrix
+    get_boundingbox (bool internal = false,
+                     const Matrix& parent_pix_size = Matrix ()) const;
+
+    OCTINTERP_API double
+    get___fontsize_points__ (double box_pix_height = 0) const;
 
     // See the genprops.awk script for an explanation of the
     // properties declarations.
@@ -6052,8 +6119,8 @@
       position.add_constraint (dim_vector (1, 4));
     }
 
-    void update_units (const caseless_str& old_units);
-    void update_fontunits (const caseless_str& old_units);
+    OCTINTERP_API void update_units (const caseless_str& old_units);
+    OCTINTERP_API void update_fontunits (const caseless_str& old_units);
 
   };
 
@@ -6087,15 +6154,20 @@
 class OCTINTERP_API uitable : public base_graphics_object
 {
 public:
+
   class OCTINTERP_API properties : public base_properties
   {
   public:
-    Matrix get_boundingbox (bool internal = false,
-                            const Matrix& parent_pix_size = Matrix ()) const;
-
-    double get___fontsize_points__ (double box_pix_height = 0) const;
-
-    double get_fontsize_pixels (double box_pix_height = 0) const;
+
+    OCTINTERP_API Matrix
+    get_boundingbox (bool internal = false,
+                     const Matrix& parent_pix_size = Matrix ()) const;
+
+    OCTINTERP_API double
+    get___fontsize_points__ (double box_pix_height = 0) const;
+
+    OCTINTERP_API double
+    get_fontsize_pixels (double box_pix_height = 0) const;
 
     // See the genprops.awk script for an explanation of the
     // properties declarations.
@@ -6132,11 +6204,11 @@
       radio_property units S , "normalized|inches|centimeters|points|{pixels}|characters"
     END_PROPERTIES
 
-    Matrix get_extent_matrix (void) const;
-
-    Matrix get_backgroundcolor_rgb (void);
-
-    Matrix get_alternatebackgroundcolor_rgb (void);
+    OCTINTERP_API Matrix get_extent_matrix (void) const;
+
+    OCTINTERP_API Matrix get_backgroundcolor_rgb (void);
+
+    OCTINTERP_API Matrix get_alternatebackgroundcolor_rgb (void);
 
   protected:
     void init (void)
@@ -6148,8 +6220,8 @@
       columneditable.add_constraint ("logical");
     }
 
-    void update_units (const caseless_str& old_units);
-    void update_fontunits (const caseless_str& old_units);
+    OCTINTERP_API void update_units (const caseless_str& old_units);
+    OCTINTERP_API void update_fontunits (const caseless_str& old_units);
     void update_table_extent (void) { };
     void update_data (void) { update_table_extent (); }
     void update_fontname (void) { update_table_extent (); }
@@ -6191,9 +6263,11 @@
 class OCTINTERP_API uitoolbar : public base_graphics_object
 {
 public:
+
   class OCTINTERP_API properties : public base_properties
   {
   public:
+
     // See the genprops.awk script for an explanation of the
     // properties declarations.
     // Programming note: Keep property list sorted if new ones are added.
@@ -6255,7 +6329,7 @@
     return retval;
   }
 
-  octave_value get_default (const caseless_str& name) const;
+  OCTINTERP_API octave_value get_default (const caseless_str& name) const;
 
   octave_value get_defaults (void) const
   {
@@ -6273,7 +6347,7 @@
 
   bool valid_object (void) const { return true; }
 
-  void reset_default_properties (void);
+  OCTINTERP_API void reset_default_properties (void);
 
   bool has_readonly_property (const caseless_str& pname) const
   {
@@ -6292,9 +6366,11 @@
 class OCTINTERP_API uipushtool : public base_graphics_object
 {
 public:
+
   class OCTINTERP_API properties : public base_properties
   {
   public:
+
     // See the genprops.awk script for an explanation of the
     // properties declarations.
     // Programming note: Keep property list sorted if new ones are added.
@@ -6353,9 +6429,11 @@
 class OCTINTERP_API uitoggletool : public base_graphics_object
 {
 public:
+
   class OCTINTERP_API properties : public base_properties
   {
   public:
+
     // See the genprops.awk script for an explanation of the
     // properties declarations.
     // Programming note: Keep property list sorted if new ones are added.
@@ -6414,10 +6492,10 @@
 
 // ---------------------------------------------------------------------
 
-octave_value
+OCTINTERP_API octave_value
 get_property_from_handle (double handle, const std::string& property,
                           const std::string& func);
-bool
+OCTINTERP_API bool
 set_property_in_handle (double handle, const std::string& property,
                         const octave_value& arg, const std::string& func);
 
@@ -6426,6 +6504,7 @@
 class graphics_event;
 
 class
+OCTINTERP_API
 base_graphics_event
 {
 public:
@@ -6452,6 +6531,7 @@
 };
 
 class
+OCTINTERP_API
 graphics_event
 {
 public:
@@ -6484,26 +6564,26 @@
 
   bool ok (void) const { return (rep != nullptr); }
 
-  static graphics_event
+  static OCTINTERP_API graphics_event
   create_callback_event (const graphics_handle& h,
                          const std::string& name,
                          const octave_value& data = Matrix (),
                          int busyaction = base_graphics_event::QUEUE);
 
-  static graphics_event
+  static OCTINTERP_API graphics_event
   create_callback_event (const graphics_handle& h,
                          const octave_value& cb,
                          const octave_value& data = Matrix (),
                          int busyaction = base_graphics_event::QUEUE);
 
-  static graphics_event
+  static OCTINTERP_API graphics_event
   create_mcode_event (const graphics_handle& h, const std::string& cmd,
                       int busyaction);
 
-  static graphics_event
+  static OCTINTERP_API graphics_event
   create_function_event (event_fcn fcn, void *data = nullptr);
 
-  static graphics_event
+  static OCTINTERP_API graphics_event
   create_set_event (const graphics_handle& h, const std::string& name,
                     const octave_value& value, bool notify_toolkit = true,
                     bool redraw_figure = false);
@@ -6516,17 +6596,17 @@
 {
 public:
 
-  gh_manager (octave::interpreter& interp);
+  OCTINTERP_API gh_manager (octave::interpreter& interp);
 
   // FIXME: eventually eliminate these static functions and access
   // gh_manager object through the interpreter.
 
-  graphics_handle get_handle (bool integer_figure_handle);
-
-  void free (const graphics_handle& h, bool from_root = false);
-
-  void renumber_figure (const graphics_handle& old_gh,
-                           const graphics_handle& new_gh);
+  OCTINTERP_API graphics_handle get_handle (bool integer_figure_handle);
+
+  OCTINTERP_API void free (const graphics_handle& h, bool from_root = false);
+
+  OCTINTERP_API void renumber_figure (const graphics_handle& old_gh,
+                                      const graphics_handle& new_gh);
 
   graphics_handle lookup (double val) const
   {
@@ -6554,18 +6634,19 @@
     return (p != m_handle_map.end ()) ? p->second : graphics_object ();
   }
 
-graphics_handle make_graphics_handle (const std::string& go_name,
-                                      const graphics_handle& p,
-                                      bool integer_figure_handle = false,
-                                      bool call_createfcn = true,
-                                      bool notify_toolkit = true);
-
-  graphics_handle make_figure_handle (double val,
-                                      bool notify_toolkit = true);
-
-  void push_figure (const graphics_handle& h);
-
-  void pop_figure (const graphics_handle& h);
+  OCTINTERP_API graphics_handle
+  make_graphics_handle (const std::string& go_name,
+                        const graphics_handle& p,
+                        bool integer_figure_handle = false,
+                        bool call_createfcn = true,
+                        bool notify_toolkit = true);
+
+  OCTINTERP_API graphics_handle
+  make_figure_handle (double val, bool notify_toolkit = true);
+
+  OCTINTERP_API void push_figure (const graphics_handle& h);
+
+  OCTINTERP_API void pop_figure (const graphics_handle& h);
 
   graphics_handle current_figure (void) const
   {
@@ -6620,7 +6701,8 @@
     return retval;
   }
 
-  void execute_listener (const graphics_handle& h, const octave_value& l);
+  OCTINTERP_API void
+  execute_listener (const graphics_handle& h, const octave_value& l);
 
   void execute_callback (const graphics_handle& h,
                          const std::string& name,
@@ -6641,21 +6723,25 @@
     execute_callback (h, cb, data);
   }
 
-  void execute_callback (const graphics_handle& h, const octave_value& cb,
-                         const octave_value& data = Matrix ());
-
-  void post_callback (const graphics_handle& h, const std::string& name,
-                      const octave_value& data = Matrix ());
-
-  void post_function (graphics_event::event_fcn fcn, void *fcn_data = nullptr);
-
-  void post_set (const graphics_handle& h, const std::string& name,
-                 const octave_value& value, bool notify_toolkit = true,
-                 bool redraw_figure = false);
-
-  int process_events (bool force = false);
-
-  void enable_event_processing (bool enable = true);
+  OCTINTERP_API void
+  execute_callback (const graphics_handle& h, const octave_value& cb,
+                    const octave_value& data = Matrix ());
+
+  OCTINTERP_API void
+  post_callback (const graphics_handle& h, const std::string& name,
+                 const octave_value& data = Matrix ());
+
+  OCTINTERP_API void
+  post_function (graphics_event::event_fcn fcn, void *fcn_data = nullptr);
+
+  OCTINTERP_API void
+  post_set (const graphics_handle& h, const std::string& name,
+            const octave_value& value, bool notify_toolkit = true,
+            bool redraw_figure = false);
+
+  OCTINTERP_API int process_events (bool force = false);
+
+  OCTINTERP_API void enable_event_processing (bool enable = true);
 
   bool is_handle_visible (const graphics_handle& h) const
   {
@@ -6669,11 +6755,11 @@
     return retval;
   }
 
-  void close_all_figures (void);
-
-  void restore_gcbo (void);
-
-  void post_event (const graphics_event& e);
+  OCTINTERP_API void close_all_figures (void);
+
+  OCTINTERP_API void restore_gcbo (void);
+
+  OCTINTERP_API void post_event (const graphics_event& e);
 
   octave::mutex graphics_lock (void)
   {
@@ -6720,9 +6806,10 @@
   int m_event_processing;
 };
 
-void get_children_limits (double& min_val, double& max_val,
-                          double& min_pos, double& max_neg,
-                          const Matrix& kids, char limit_type);
+OCTINTERP_API void
+get_children_limits (double& min_val, double& max_val,
+                     double& min_pos, double& max_neg,
+                     const Matrix& kids, char limit_type);
 
 OCTINTERP_API int calc_dimensions (const graphics_object& gh);
 
--- a/libinterp/corefcn/gtk-manager.h	Tue Dec 29 18:06:37 2020 +0100
+++ b/libinterp/corefcn/gtk-manager.h	Tue Dec 29 18:15:36 2020 +0100
@@ -37,7 +37,7 @@
 
 namespace octave
 {
-  class gtk_manager
+  class OCTINTERP_API gtk_manager
   {
   public:
 
--- a/libinterp/corefcn/interpreter-private.h	Tue Dec 29 18:06:37 2020 +0100
+++ b/libinterp/corefcn/interpreter-private.h	Tue Dec 29 18:15:36 2020 +0100
@@ -54,45 +54,45 @@
   class tree_evaluator;
   class type_info;
 
-  extern interpreter& __get_interpreter__ (const std::string& who);
+  extern OCTINTERP_API interpreter& __get_interpreter__ (const std::string& who);
 
-  extern dynamic_loader& __get_dynamic_loader__ (const std::string& who);
+  extern OCTINTERP_API dynamic_loader& __get_dynamic_loader__ (const std::string& who);
 
-  extern error_system& __get_error_system__ (const std::string& who);
+  extern OCTINTERP_API error_system& __get_error_system__ (const std::string& who);
 
-  extern gh_manager& __get_gh_manager__ (const std::string& who);
+  extern OCTINTERP_API gh_manager& __get_gh_manager__ (const std::string& who);
 
-  extern help_system& __get_help_system__ (const std::string& who);
+  extern OCTINTERP_API help_system& __get_help_system__ (const std::string& who);
 
-  extern input_system& __get_input_system__ (const std::string& who);
+  extern OCTINTERP_API input_system& __get_input_system__ (const std::string& who);
 
-  extern load_path& __get_load_path__ (const std::string& who);
+  extern OCTINTERP_API load_path& __get_load_path__ (const std::string& who);
 
-  extern load_save_system& __get_load_save_system__ (const std::string& who);
+  extern OCTINTERP_API load_save_system& __get_load_save_system__ (const std::string& who);
 
-  extern event_manager& __get_event_manager__ (const std::string& who);
+  extern OCTINTERP_API event_manager& __get_event_manager__ (const std::string& who);
 
-  extern output_system& __get_output_system__ (const std::string& who);
+  extern OCTINTERP_API output_system& __get_output_system__ (const std::string& who);
 
-  extern type_info& __get_type_info__ (const std::string& who);
+  extern OCTINTERP_API type_info& __get_type_info__ (const std::string& who);
 
-  extern symbol_table& __get_symbol_table__ (const std::string& who);
+  extern OCTINTERP_API symbol_table& __get_symbol_table__ (const std::string& who);
 
-  extern symbol_scope __get_current_scope__ (const std::string& who);
+  extern OCTINTERP_API symbol_scope __get_current_scope__ (const std::string& who);
 
-  extern symbol_scope __require_current_scope__ (const std::string& who);
+  extern OCTINTERP_API symbol_scope __require_current_scope__ (const std::string& who);
 
-  extern tree_evaluator& __get_evaluator__ (const std::string& who);
+  extern OCTINTERP_API tree_evaluator& __get_evaluator__ (const std::string& who);
 
-  extern bp_table& __get_bp_table__ (const std::string& who);
+  extern OCTINTERP_API bp_table& __get_bp_table__ (const std::string& who);
 
-  extern child_list& __get_child_list__ (const std::string& who);
+  extern OCTINTERP_API child_list& __get_child_list__ (const std::string& who);
 
-  extern cdef_manager& __get_cdef_manager__ (const std::string& who);
+  extern OCTINTERP_API cdef_manager& __get_cdef_manager__ (const std::string& who);
 
-  extern display_info& __get_display_info__ (const std::string& who);
+  extern OCTINTERP_API display_info& __get_display_info__ (const std::string& who);
 
-  extern gtk_manager& __get_gtk_manager__ (const std::string& who);
+  extern OCTINTERP_API gtk_manager& __get_gtk_manager__ (const std::string& who);
 
   // Functions that could be methods in the interpreter class but maybe
   // shouldn't be exposed as part of the public interface.
@@ -102,10 +102,12 @@
   // or the text of an inline function that has the given argument names
   // PARAMETER_NAMES.  Use of the latter form is discouraged.
 
+  OCTINTERP_API
   octave_value
   get_function_handle (interpreter& interp, const octave_value& arg,
                        const std::string& parameter_name);
 
+  OCTINTERP_API
   octave_value
   get_function_handle (interpreter& interp, const octave_value& arg,
                        const std::list<std::string>& parameter_names
--- a/libinterp/corefcn/load-save.h	Tue Dec 29 18:06:37 2020 +0100
+++ b/libinterp/corefcn/load-save.h	Tue Dec 29 18:15:36 2020 +0100
@@ -73,16 +73,16 @@
         NO_OPTION = 0
       };
 
-    load_save_system (interpreter& interp);
+    OCTINTERP_API load_save_system (interpreter& interp);
 
-    ~load_save_system (void);
+    OCTINTERP_API ~load_save_system (void);
 
     load_save_system (const load_save_system&) = delete;
 
     load_save_system& operator = (const load_save_system&) = delete;
 
-    octave_value crash_dumps_octave_core (const octave_value_list& args,
-                                          int nargout);
+    OCTINTERP_API octave_value
+    crash_dumps_octave_core (const octave_value_list& args, int nargout);
 
     bool crash_dumps_octave_core (void) const
     {
@@ -107,8 +107,8 @@
       return set (m_octave_core_file_limit, limit);
     }
 
-    octave_value octave_core_file_name (const octave_value_list& args,
-                                        int nargout);
+    OCTINTERP_API octave_value
+    octave_core_file_name (const octave_value_list& args, int nargout);
 
     std::string octave_core_file_name (void) const
     {
@@ -120,8 +120,8 @@
       return set (m_octave_core_file_name, file);
     }
 
-    octave_value save_default_options (const octave_value_list& args,
-                                       int nargout);
+    OCTINTERP_API octave_value
+    save_default_options (const octave_value_list& args, int nargout);
 
     std::string save_default_options (void) const
     {
@@ -133,8 +133,8 @@
       return set (m_save_default_options, options);
     }
 
-    octave_value octave_core_file_options (const octave_value_list& args,
-                                           int nargout);
+    OCTINTERP_API octave_value
+    octave_core_file_options (const octave_value_list& args, int nargout);
 
     std::string octave_core_file_options (void) const
     {
@@ -146,8 +146,8 @@
       return set (m_octave_core_file_options, options);
     }
 
-    octave_value save_header_format_string (const octave_value_list& args,
-                                            int nargout);
+    OCTINTERP_API octave_value
+    save_header_format_string (const octave_value_list& args, int nargout);
 
     std::string save_header_format_string (void) const
     {
@@ -159,42 +159,40 @@
       return set (m_save_header_format_string, format);
     }
 
-    static load_save_format get_file_format (const std::string& fname,
-                                             const std::string& orig_fname,
-                                             bool& use_zlib,
-                                             bool quiet = false);
+    static OCTINTERP_API load_save_format
+    get_file_format (const std::string& fname, const std::string& orig_fname,
+                     bool& use_zlib, bool quiet = false);
 
     // FIXME: this is probably not the best public interface for
     // loading and saving variables, but it is what is currently
     // needed for the Fload and Fsave functions.
 
-    octave_value load_vars (std::istream& stream,
-                            const std::string& orig_fname,
-                            const load_save_format& fmt,
-                            mach_info::float_format flt_fmt,
-                            bool list_only, bool swap, bool verbose,
-                            const string_vector& argv, int argv_idx,
-                            int argc, int nargout);
+    OCTINTERP_API octave_value
+    load_vars (std::istream& stream, const std::string& orig_fname,
+               const load_save_format& fmt, mach_info::float_format flt_fmt,
+               bool list_only, bool swap, bool verbose,
+               const string_vector& argv, int argv_idx, int argc, int nargout);
 
-    static string_vector
+    static OCTINTERP_API string_vector
     parse_save_options (const string_vector& argv, load_save_format& fmt,
                         bool& append, bool& save_as_floats, bool& use_zlib);
 
-    static string_vector
+    static OCTINTERP_API string_vector
     parse_save_options (const std::string& arg, load_save_format& fmt,
                         bool& append, bool& save_as_floats, bool& use_zlib);
 
-    void save_vars (const string_vector& argv, int argv_idx, int argc,
-                    std::ostream& os, const load_save_format& fmt,
-                    bool save_as_floats, bool write_header_info);
+    OCTINTERP_API void
+    save_vars (const string_vector& argv, int argv_idx, int argc,
+               std::ostream& os, const load_save_format& fmt,
+               bool save_as_floats, bool write_header_info);
 
-    void dump_octave_core (void);
+    OCTINTERP_API void dump_octave_core (void);
 
-    octave_value_list
+    OCTINTERP_API octave_value_list
     load (const octave_value_list& args = octave_value_list (),
           int nargout = 0);
 
-    octave_value_list
+    OCTINTERP_API octave_value_list
     save (const octave_value_list& args = octave_value_list (),
           int nargout = 0);
 
@@ -225,34 +223,39 @@
     // '#' and contain no newline characters.
     std::string m_save_header_format_string;
 
-    void write_header (std::ostream& os, const load_save_format& fmt);
+    OCTINTERP_API void
+    write_header (std::ostream& os, const load_save_format& fmt);
+
+    OCTINTERP_API size_t
+    save_vars (std::ostream& os, const std::string& pattern,
+               const load_save_format& fmt, bool save_as_floats);
+
+    OCTINTERP_API void
+    do_save (std::ostream& os, const octave_value& tc, const std::string& name,
+             const std::string& help, bool global, const load_save_format& fmt,
+             bool save_as_floats);
 
-    size_t save_vars (std::ostream& os, const std::string& pattern,
+    OCTINTERP_API void
+    do_save (std::ostream& os, const symbol_info& syminfo,
+             const load_save_format& fmt, bool save_as_floats);
+
+    OCTINTERP_API size_t
+    save_fields (std::ostream& os, const octave_scalar_map& m,
+                 const std::string& pattern, const load_save_format& fmt,
+                 bool save_as_floats);
+
+    OCTINTERP_API void
+    dump_octave_core (std::ostream& os, const char *fname,
                       const load_save_format& fmt, bool save_as_floats);
 
-    void do_save (std::ostream& os, const octave_value& tc,
-                  const std::string& name, const std::string& help,
-                  bool global, const load_save_format& fmt,
-                  bool save_as_floats);
-
-    void do_save (std::ostream& os, const symbol_info& syminfo,
-                  const load_save_format& fmt, bool save_as_floats);
-
-    size_t save_fields (std::ostream& os, const octave_scalar_map& m,
-                        const std::string& pattern,
-                        const load_save_format& fmt, bool save_as_floats);
+    OCTINTERP_API void
+    install_loaded_variable (const std::string& name, const octave_value& val,
+                             bool global, const std::string& /*doc*/);
 
-    void dump_octave_core (std::ostream& os, const char *fname,
-                           const load_save_format& fmt, bool save_as_floats);
+    static OCTINTERP_API std::string init_save_header_format (void);
 
-    void install_loaded_variable (const std::string& name,
-                                  const octave_value& val,
-                                  bool global, const std::string& /*doc*/);
-
-    static std::string init_save_header_format (void);
-
-    static load_save_format get_file_format (std::istream& file,
-                                             const std::string& filename);
+    static OCTINTERP_API load_save_format
+    get_file_format (std::istream& file, const std::string& filename);
 
     template <typename T>
     T set (T& var, const T& new_val)
@@ -290,6 +293,6 @@
   };
 }
 
-extern void dump_octave_core (void);
+extern OCTINTERP_API void dump_octave_core (void);
 
 #endif
--- a/libinterp/corefcn/ls-hdf5.h	Tue Dec 29 18:06:37 2020 +0100
+++ b/libinterp/corefcn/ls-hdf5.h	Tue Dec 29 18:15:36 2020 +0100
@@ -53,13 +53,13 @@
 
   ~hdf5_fstreambase () { close (); }
 
-  hdf5_fstreambase (const char *name, int mode, int /* prot */ = 0);
+  OCTINTERP_API hdf5_fstreambase (const char *name, int mode, int /* prot */ = 0);
 
-  void close (void);
+  OCTINTERP_API void close (void);
 
-  void open (const char *name, int mode, int);
+  OCTINTERP_API void open (const char *name, int mode, int);
 
-  void open_create (const char *name, int mode);
+  OCTINTERP_API void open_create (const char *name, int mode);
 };
 
 // input and output streams, subclassing istream and ostream
--- a/libinterp/corefcn/ls-mat-ascii.h	Tue Dec 29 18:06:37 2020 +0100
+++ b/libinterp/corefcn/ls-mat-ascii.h	Tue Dec 29 18:15:36 2020 +0100
@@ -33,15 +33,15 @@
 
 class octave_value;
 
-extern std::string
+extern OCTINTERP_API std::string
 read_mat_ascii_data (std::istream& is, const std::string& filename,
                      octave_value& tc);
 
-extern bool
+extern OCTINTERP_API bool
 save_mat_ascii_data (std::ostream& os, const octave_value& val_arg,
                      int precision, bool tabs = false);
 
-extern bool looks_like_mat_ascii_file (std::istream& is,
-                                       const std::string& filename);
+extern OCTINTERP_API bool
+looks_like_mat_ascii_file (std::istream& is, const std::string& filename);
 
 #endif
--- a/libinterp/corefcn/ls-mat4.h	Tue Dec 29 18:06:37 2020 +0100
+++ b/libinterp/corefcn/ls-mat4.h	Tue Dec 29 18:15:36 2020 +0100
@@ -34,22 +34,22 @@
 
 class octave_value;
 
-extern octave::mach_info::float_format
+extern OCTINTERP_API octave::mach_info::float_format
 mopt_digit_to_float_format (int mach);
 
-extern int
+extern OCTINTERP_API int
 float_format_to_mopt_digit (octave::mach_info::float_format flt_fmt);
 
-extern int
+extern OCTINTERP_API int
 read_mat_file_header (std::istream& is, bool& swap, int32_t& mopt,
                       int32_t& nr, int32_t& nc, int32_t& imag,
                       int32_t& len, int quiet = 0);
 
-extern std::string
+extern OCTINTERP_API std::string
 read_mat_binary_data (std::istream& is, const std::string& filename,
                       octave_value& tc);
 
-extern bool
+extern OCTINTERP_API bool
 save_mat_binary_data (std::ostream& os, const octave_value& tc,
                       const std::string& name);
 
--- a/libinterp/corefcn/ls-mat5.h	Tue Dec 29 18:06:37 2020 +0100
+++ b/libinterp/corefcn/ls-mat5.h	Tue Dec 29 18:15:36 2020 +0100
@@ -55,14 +55,14 @@
   miUTF32                     // Unicode UTF-32 Encoded Character Data
 };
 
-extern int
+extern OCTINTERP_API int
 read_mat5_binary_file_header (std::istream& is, bool& swap,
                               bool quiet = false,
                               const std::string& filename = "");
-extern std::string
+extern OCTINTERP_API std::string
 read_mat5_binary_element (std::istream& is, const std::string& filename,
                           bool swap, bool& global, octave_value& tc);
-extern bool
+extern OCTINTERP_API bool
 save_mat5_binary_element (std::ostream& os,
                           const octave_value& tc, const std::string& name,
                           bool mark_global, bool mat7_format,
--- a/libinterp/corefcn/ls-utils.h	Tue Dec 29 18:06:37 2020 +0100
+++ b/libinterp/corefcn/ls-utils.h	Tue Dec 29 18:15:36 2020 +0100
@@ -30,10 +30,10 @@
 
 #include "data-conv.h"
 
-extern save_type
+extern OCTINTERP_API save_type
 get_save_type (double max_val, double min_val);
 
-extern save_type
+extern OCTINTERP_API save_type
 get_save_type (float max_val, float min_val);
 
 #endif
--- a/libinterp/corefcn/mxarray.h	Tue Dec 29 18:06:37 2020 +0100
+++ b/libinterp/corefcn/mxarray.h	Tue Dec 29 18:15:36 2020 +0100
@@ -81,16 +81,16 @@
       rep->METHOD_CALL;                         \
     }
 
-class mxArray;
+class OCTINTERP_API mxArray;
 
 // A class to provide the default implementation of some of the
 // virtual functions declared in the mxArray class.
 
-class mxArray_base
+class OCTINTERP_API mxArray_base
 {
 protected:
 
-  mxArray_base (bool interleaved);
+  OCTINTERP_API mxArray_base (bool interleaved);
 
 public:
 
@@ -336,42 +336,43 @@
 {
 public:
 
-  mxArray (bool interleaved, const octave_value& ov);
+  OCTINTERP_API mxArray (bool interleaved, const octave_value& ov);
 
-  mxArray (bool interleaved, mxClassID id, mwSize ndims, const mwSize *dims,
-           mxComplexity flag = mxREAL, bool init = true);
+  OCTINTERP_API mxArray (bool interleaved, mxClassID id, mwSize ndims,
+                         const mwSize *dims, mxComplexity flag = mxREAL,
+                         bool init = true);
 
-  mxArray (bool interleaved, mxClassID id, const dim_vector& dv,
-           mxComplexity flag = mxREAL);
+  OCTINTERP_API mxArray (bool interleaved, mxClassID id, const dim_vector& dv,
+                         mxComplexity flag = mxREAL);
 
-  mxArray (bool interleaved, mxClassID id, mwSize m, mwSize n,
-           mxComplexity flag = mxREAL, bool init = true);
+  OCTINTERP_API mxArray (bool interleaved, mxClassID id, mwSize m, mwSize n,
+                         mxComplexity flag = mxREAL, bool init = true);
 
-  mxArray (bool interleaved, mxClassID id, double val);
+  OCTINTERP_API mxArray (bool interleaved, mxClassID id, double val);
 
-  mxArray (bool interleaved, mxClassID id, mxLogical val);
+  OCTINTERP_API mxArray (bool interleaved, mxClassID id, mxLogical val);
 
-  mxArray (bool interleaved, const char *str);
+  OCTINTERP_API mxArray (bool interleaved, const char *str);
 
-  mxArray (bool interleaved, mwSize m, const char **str);
+  OCTINTERP_API mxArray (bool interleaved, mwSize m, const char **str);
 
-  mxArray (bool interleaved, mxClassID id, mwSize m, mwSize n, mwSize nzmax,
-           mxComplexity flag = mxREAL);
+  OCTINTERP_API mxArray (bool interleaved, mxClassID id, mwSize m, mwSize n,
+                         mwSize nzmax, mxComplexity flag = mxREAL);
 
-  mxArray (bool interleaved, mwSize ndims, const mwSize *dims, int num_keys,
-           const char **keys);
+  OCTINTERP_API mxArray (bool interleaved, mwSize ndims, const mwSize *dims,
+                         int num_keys, const char **keys);
 
-  mxArray (bool interleaved, const dim_vector& dv, int num_keys,
-           const char **keys);
+  OCTINTERP_API mxArray (bool interleaved, const dim_vector& dv, int num_keys,
+                         const char **keys);
 
-  mxArray (bool interleaved, mwSize m, mwSize n, int num_keys,
-           const char **keys);
+  OCTINTERP_API mxArray (bool interleaved, mwSize m, mwSize n, int num_keys,
+                         const char **keys);
 
-  mxArray (bool interleaved, mwSize ndims, const mwSize *dims);
+  OCTINTERP_API mxArray (bool interleaved, mwSize ndims, const mwSize *dims);
 
-  mxArray (bool interleaved, const dim_vector& dv);
+  OCTINTERP_API mxArray (bool interleaved, const dim_vector& dv);
 
-  mxArray (bool interleaved, mwSize m, mwSize n);
+  OCTINTERP_API mxArray (bool interleaved, mwSize m, mwSize n);
 
   mxArray * dup (void) const
   {
@@ -395,7 +396,7 @@
 
   mxArray& operator = (const mxArray&) = delete;
 
-  ~mxArray (void);
+  OCTINTERP_API ~mxArray (void);
 
   bool is_octave_value (void) const { return rep->is_octave_value (); }
 
@@ -467,7 +468,7 @@
 
   const char * get_name (void) const { return name; }
 
-  void set_name (const char *name_arg);
+  OCTINTERP_API void set_name (const char *name_arg);
 
   mxClassID get_class_id (void) const { return rep->get_class_id (); }
 
@@ -670,9 +671,9 @@
 
   mxArray * mutate (void) const { return rep->mutate (); }
 
-  static void * malloc (size_t n);
+  static OCTINTERP_API void * malloc (size_t n);
 
-  static void * calloc (size_t n, size_t t);
+  static OCTINTERP_API void * calloc (size_t n, size_t t);
 
   static char * strsave (const char *str)
   {
@@ -691,10 +692,10 @@
     return retval;
   }
 
-  static octave_value
+  static OCTINTERP_API octave_value
   as_octave_value (const mxArray *ptr, bool null_is_empty = true);
 
-  octave_value as_octave_value (void) const;
+  OCTINTERP_API octave_value as_octave_value (void) const;
 
 private:
 
@@ -705,38 +706,38 @@
   mxArray (mxArray_base *r, const char *n)
     : rep (r), name (mxArray::strsave (n)) { }
 
-  static mxArray_base *
+  static OCTINTERP_API mxArray_base *
   create_rep (bool interleaved, const octave_value& ov);
 
-  static mxArray_base *
+  static OCTINTERP_API mxArray_base *
   create_rep (bool interleaved, mxClassID id, mwSize ndims,
               const mwSize *dims, mxComplexity flag, bool init);
 
-  static mxArray_base *
+  static OCTINTERP_API mxArray_base *
   create_rep (bool interleaved, mxClassID id, const dim_vector& dv,
               mxComplexity flag);
 
-  static mxArray_base *
+  static OCTINTERP_API mxArray_base *
   create_rep (bool interleaved, mxClassID id, mwSize m, mwSize n,
               mxComplexity flag, bool init);
 
-  static mxArray_base *
+  static OCTINTERP_API mxArray_base *
   create_rep (bool interleaved, mxClassID id, double val);
 
-  static mxArray_base *
+  static OCTINTERP_API mxArray_base *
   create_rep (bool interleaved, mxClassID id, mxLogical val);
 
-  static mxArray_base *
+  static OCTINTERP_API mxArray_base *
   create_rep (bool interleaved, const char *str);
 
-  static mxArray_base *
+  static OCTINTERP_API mxArray_base *
   create_rep (bool interleaved, mwSize m, const char **str);
 
-  static mxArray_base *
+  static OCTINTERP_API mxArray_base *
   create_rep (bool interleaved, mxClassID id, mwSize m, mwSize n,
               mwSize nzmax, mxComplexity flag);
 
-  void maybe_mutate (void) const;
+  OCTINTERP_API void maybe_mutate (void) const;
 };
 
 #undef DO_MUTABLE_METHOD
--- a/libinterp/corefcn/oct-hist.h	Tue Dec 29 18:06:37 2020 +0100
+++ b/libinterp/corefcn/oct-hist.h	Tue Dec 29 18:15:36 2020 +0100
@@ -38,7 +38,7 @@
 {
   class interpreter;
 
-  class history_system
+  class OCTINTERP_API history_system
   {
   public:
 
--- a/libinterp/corefcn/oct-process.cc	Tue Dec 29 18:06:37 2020 +0100
+++ b/libinterp/corefcn/oct-process.cc	Tue Dec 29 18:15:36 2020 +0100
@@ -33,7 +33,6 @@
 
 namespace octave
 {
-  OCTINTERP_API
   process_execution_result
   process_execution_result::of_success (int exit_status,
                                         const std::string& stdout_output)
@@ -41,7 +40,6 @@
     return process_execution_result (0, exit_status, stdout_output, "");
   }
 
-  OCTINTERP_API
   process_execution_result
   process_execution_result::of_error (int status, const std::string& err_msg)
   {
@@ -49,7 +47,6 @@
   }
 
   // Execute a shell command, returning results as a C++ object
-  OCTINTERP_API
   process_execution_result
   run_command_and_return_output (const std::string& cmd_str)
   {
--- a/libinterp/corefcn/oct-process.h	Tue Dec 29 18:06:37 2020 +0100
+++ b/libinterp/corefcn/oct-process.h	Tue Dec 29 18:15:36 2020 +0100
@@ -32,7 +32,6 @@
 
 namespace octave
 {
-  OCTINTERP_API
   class
   process_execution_result
   {
@@ -49,10 +48,10 @@
         m_stdout_output (stdout_output)
     { }
 
-    static process_execution_result
+    static OCTINTERP_API process_execution_result
     of_success (int exit_status, const std::string& stdout_output);
 
-    static process_execution_result
+    static OCTINTERP_API process_execution_result
     of_error (int status, const std::string& err_msg);
 
     int status (void) const { return m_status; }
--- a/libinterp/corefcn/oct-stream.cc	Tue Dec 29 18:06:37 2020 +0100
+++ b/libinterp/corefcn/oct-stream.cc	Tue Dec 29 18:15:36 2020 +0100
@@ -7084,7 +7084,7 @@
 
 #define INSTANTIATE_WRITE(T)                                            \
   template                                                              \
-  octave_idx_type                                                       \
+  OCTINTERP_API octave_idx_type                                         \
   stream::write (const Array<T>& data, octave_idx_type block_size,      \
                  oct_data_conv::data_type output_type,                  \
                  octave_idx_type skip,                                  \
--- a/libinterp/corefcn/oct-stream.h	Tue Dec 29 18:06:37 2020 +0100
+++ b/libinterp/corefcn/oct-stream.h	Tue Dec 29 18:15:36 2020 +0100
@@ -160,16 +160,16 @@
 
     // Set current error state and set fail to TRUE.
 
-    void error (const std::string& msg);
-    void error (const std::string& who, const std::string& msg);
+    OCTINTERP_API void error (const std::string& msg);
+    OCTINTERP_API void error (const std::string& who, const std::string& msg);
 
     // Clear any error message and set fail to FALSE.
 
-    void clear (void);
+    OCTINTERP_API void clear (void);
 
     // Clear stream state.
 
-    void clearerr (void);
+    OCTINTERP_API void clearerr (void);
 
   private:
 
@@ -195,57 +195,69 @@
     // Functions that are defined for all input streams (input streams
     // are those that define is).
 
-    std::string do_gets (octave_idx_type max_len, bool& err, bool strip_newline,
-                         const std::string& who /* = "gets" */);
+    OCTINTERP_API std::string
+    do_gets (octave_idx_type max_len, bool& err, bool strip_newline,
+             const std::string& who /* = "gets" */);
 
-    std::string getl (octave_idx_type max_len, bool& err,
-                      const std::string& who /* = "getl" */);
-    std::string gets (octave_idx_type max_len, bool& err,
-                      const std::string& who /* = "gets" */);
-    off_t skipl (off_t count, bool& err, const std::string& who /* = "skipl" */);
+    OCTINTERP_API std::string
+    getl (octave_idx_type max_len, bool& err,
+          const std::string& who /* = "getl" */);
+    OCTINTERP_API std::string
+    gets (octave_idx_type max_len, bool& err,
+          const std::string& who /* = "gets" */);
+    OCTINTERP_API off_t
+    skipl (off_t count, bool& err, const std::string& who /* = "skipl" */);
 
-    octave_value do_scanf (scanf_format_list& fmt_list, octave_idx_type nr,
-                           octave_idx_type nc,
-                           bool one_elt_size_spec, octave_idx_type& count,
-                           const std::string& who /* = "scanf" */);
+    OCTINTERP_API octave_value
+    do_scanf (scanf_format_list& fmt_list, octave_idx_type nr,
+              octave_idx_type nc, bool one_elt_size_spec,
+              octave_idx_type& count, const std::string& who /* = "scanf" */);
 
-    octave_value scanf (const std::string& fmt, const Array<double>& size,
-                        octave_idx_type& count, const std::string& who /* = "scanf" */);
+    OCTINTERP_API octave_value
+    scanf (const std::string& fmt, const Array<double>& size,
+           octave_idx_type& count, const std::string& who /* = "scanf" */);
 
-    bool do_oscanf (const scanf_format_elt *elt, octave_value&,
-                    const std::string& who /* = "scanf" */);
+    OCTINTERP_API bool
+    do_oscanf (const scanf_format_elt *elt, octave_value&,
+               const std::string& who /* = "scanf" */);
 
-    octave_value_list oscanf (const std::string& fmt,
-                              const std::string& who /* = "scanf" */);
+    OCTINTERP_API octave_value_list
+    oscanf (const std::string& fmt, const std::string& who /* = "scanf" */);
 
-    octave_value do_textscan (const std::string& fmt, octave_idx_type ntimes,
-                              const octave_value_list& options,
-                              const std::string& who, octave_idx_type& count);
+    OCTINTERP_API octave_value
+    do_textscan (const std::string& fmt, octave_idx_type ntimes,
+                 const octave_value_list& options,
+                 const std::string& who, octave_idx_type& count);
 
     // Functions that are defined for all output streams (output streams
     // are those that define os).
 
-    int flush (void);
+    OCTINTERP_API int flush (void);
 
-    int do_numeric_printf_conv (std::ostream& os, const printf_format_elt *elt,
-                                int nsa, int sa_1, int sa_2,
-                                const octave_value& val,
-                                const std::string& who);
+    OCTINTERP_API int
+    do_numeric_printf_conv (std::ostream& os, const printf_format_elt *elt,
+                            int nsa, int sa_1, int sa_2,
+                            const octave_value& val,
+                            const std::string& who);
+
+    OCTINTERP_API void field_width_error (const std::string& who) const;
 
-    void field_width_error (const std::string& who) const;
-
-    int do_printf (printf_format_list& fmt_list, const octave_value_list& args,
-                   const std::string& who /* = "printf" */);
+    OCTINTERP_API int
+    do_printf (printf_format_list& fmt_list, const octave_value_list& args,
+               const std::string& who /* = "printf" */);
 
-    int printf (const std::string& fmt, const octave_value_list& args,
-                const std::string& who /* = "printf" */);
+    OCTINTERP_API int
+    printf (const std::string& fmt, const octave_value_list& args,
+            const std::string& who /* = "printf" */);
 
-    int puts (const std::string& s, const std::string& who /* = "puts" */);
+    OCTINTERP_API int
+    puts (const std::string& s, const std::string& who /* = "puts" */);
 
     // We can always do this in terms of seek(), so the derived class
     // only has to provide that.
 
-    void invalid_operation (const std::string& who, const char *rw);
+    OCTINTERP_API void
+    invalid_operation (const std::string& who, const char *rw);
   };
 
   class
@@ -263,82 +275,101 @@
 
     ~stream (void) = default;
 
-    int flush (void);
+    OCTINTERP_API int flush (void);
 
-    std::string getl (octave_idx_type max_len, bool& err,
-                      const std::string& who /* = "getl" */);
-    std::string getl (const octave_value& max_len, bool& err,
-                      const std::string& who /* = "getl" */);
+    OCTINTERP_API std::string
+    getl (octave_idx_type max_len, bool& err,
+          const std::string& who /* = "getl" */);
+
+    OCTINTERP_API std::string
+    getl (const octave_value& max_len, bool& err,
+          const std::string& who /* = "getl" */);
 
-    std::string gets (octave_idx_type max_len, bool& err,
-                      const std::string& who /* = "gets" */);
-    std::string gets (const octave_value& max_len, bool& err,
-                      const std::string& who /* = "gets" */);
+    OCTINTERP_API std::string
+    gets (octave_idx_type max_len, bool& err,
+          const std::string& who /* = "gets" */);
+
+    OCTINTERP_API std::string
+    gets (const octave_value& max_len, bool& err,
+          const std::string& who /* = "gets" */);
 
-    off_t skipl (off_t count, bool& err, const std::string& who /* = "skipl" */);
-    off_t skipl (const octave_value& count, bool& err,
-                 const std::string& who /* = "skipl" */);
+    OCTINTERP_API off_t
+    skipl (off_t count, bool& err, const std::string& who /* = "skipl" */);
 
-    int seek (off_t offset, int origin);
-    int seek (const octave_value& offset, const octave_value& origin);
+    OCTINTERP_API off_t
+    skipl (const octave_value& count, bool& err,
+           const std::string& who /* = "skipl" */);
 
-    off_t tell (void);
+    OCTINTERP_API int seek (off_t offset, int origin);
 
-    int rewind (void);
+    OCTINTERP_API int
+    seek (const octave_value& offset, const octave_value& origin);
+
+    OCTINTERP_API off_t tell (void);
 
-    bool is_open (void) const;
+    OCTINTERP_API int rewind (void);
 
-    void close (void);
+    OCTINTERP_API bool is_open (void) const;
+
+    OCTINTERP_API void close (void);
 
-    octave_value read (const Array<double>& size, octave_idx_type block_size,
-                       oct_data_conv::data_type input_type,
-                       oct_data_conv::data_type output_type,
-                       octave_idx_type skip, mach_info::float_format flt_fmt,
-                       octave_idx_type& count);
+    OCTINTERP_API octave_value
+    read (const Array<double>& size, octave_idx_type block_size,
+          oct_data_conv::data_type input_type,
+          oct_data_conv::data_type output_type,
+          octave_idx_type skip, mach_info::float_format flt_fmt,
+          octave_idx_type& count);
 
-    octave_idx_type write (const octave_value& data, octave_idx_type block_size,
-                           oct_data_conv::data_type output_type,
-                           octave_idx_type skip,
-                           mach_info::float_format flt_fmt);
+    OCTINTERP_API octave_idx_type
+    write (const octave_value& data, octave_idx_type block_size,
+           oct_data_conv::data_type output_type,
+           octave_idx_type skip, mach_info::float_format flt_fmt);
 
-    bool write_bytes (const void *data, size_t n_elts);
+    OCTINTERP_API bool write_bytes (const void *data, size_t n_elts);
 
-    bool skip_bytes (size_t n_elts);
+    OCTINTERP_API bool skip_bytes (size_t n_elts);
 
     template <typename T>
-      octave_idx_type write (const Array<T>& data, octave_idx_type block_size,
-                             oct_data_conv::data_type output_type,
-                             octave_idx_type skip,
-                             mach_info::float_format flt_fmt);
+    OCTINTERP_API octave_idx_type
+    write (const Array<T>& data, octave_idx_type block_size,
+           oct_data_conv::data_type output_type,
+           octave_idx_type skip, mach_info::float_format flt_fmt);
 
-    octave_value scanf (const std::string& fmt, const Array<double>& size,
-                        octave_idx_type& count, const std::string& who /* = "scanf" */);
+    OCTINTERP_API octave_value
+    scanf (const std::string& fmt, const Array<double>& size,
+           octave_idx_type& count, const std::string& who /* = "scanf" */);
 
-    octave_value scanf (const octave_value& fmt, const Array<double>& size,
-                        octave_idx_type& count, const std::string& who /* = "scanf" */);
+    OCTINTERP_API octave_value
+    scanf (const octave_value& fmt, const Array<double>& size,
+           octave_idx_type& count, const std::string& who /* = "scanf" */);
 
-    octave_value_list oscanf (const std::string& fmt,
-                              const std::string& who /* = "scanf" */);
+    OCTINTERP_API octave_value_list
+    oscanf (const std::string& fmt, const std::string& who /* = "scanf" */);
 
-    octave_value_list oscanf (const octave_value& fmt,
-                              const std::string& who /* = "scanf" */);
+    OCTINTERP_API octave_value_list
+    oscanf (const octave_value& fmt, const std::string& who /* = "scanf" */);
 
-    octave_value textscan (const std::string& fmt, octave_idx_type ntimes,
-                           const octave_value_list& options,
-                           const std::string& who, octave_idx_type& count);
+    OCTINTERP_API octave_value
+    textscan (const std::string& fmt, octave_idx_type ntimes,
+              const octave_value_list& options,
+              const std::string& who, octave_idx_type& count);
 
-    int printf (const std::string& fmt, const octave_value_list& args,
-                const std::string& who /* = "printf" */);
+    OCTINTERP_API int
+    printf (const std::string& fmt, const octave_value_list& args,
+            const std::string& who /* = "printf" */);
 
-    int printf (const octave_value& fmt, const octave_value_list& args,
-                const std::string& who /* = "printf" */);
+    OCTINTERP_API int
+    printf (const octave_value& fmt, const octave_value_list& args,
+            const std::string& who /* = "printf" */);
 
-    int puts (const std::string& s, const std::string& who /* = "puts" */);
-    int puts (const octave_value& s, const std::string& who /* = "puts" */);
+    OCTINTERP_API int
+    puts (const std::string& s, const std::string& who /* = "puts" */);
+    OCTINTERP_API int
+    puts (const octave_value& s, const std::string& who /* = "puts" */);
 
-    bool eof (void) const;
+    OCTINTERP_API bool eof (void) const;
 
-    std::string error (bool clear, int& err_num);
+    OCTINTERP_API std::string error (bool clear, int& err_num);
 
     std::string error (bool clear = false)
     {
@@ -364,13 +395,13 @@
 
     operator bool () const { return ok (); }
 
-    std::string name (void) const;
+    OCTINTERP_API std::string name (void) const;
 
-    int mode (void) const;
+    OCTINTERP_API int mode (void) const;
 
-    mach_info::float_format float_format (void) const;
+    OCTINTERP_API mach_info::float_format float_format (void) const;
 
-    static std::string mode_as_string (int mode);
+    OCTINTERP_API static std::string mode_as_string (int mode);
 
     std::string encoding (void)
     {
@@ -415,7 +446,7 @@
         m_rep->invalid_operation (who, rw);
     }
 
-    octave_value
+    OCTINTERP_API octave_value
     finalize_read (std::list<void *>& input_buf_list,
                    octave_idx_type input_buf_elts,
                    octave_idx_type elts_read,
@@ -431,35 +462,36 @@
   {
   public:
 
-    stream_list (interpreter& interp);
+    OCTINTERP_API stream_list (interpreter& interp);
 
     stream_list (const stream_list&) = delete;
     stream_list& operator = (const stream_list&) = delete;
 
-    ~stream_list (void);
+    OCTINTERP_API ~stream_list (void);
 
-    int insert (stream& os);
+    OCTINTERP_API int insert (stream& os);
 
-    stream lookup (int fid, const std::string& who = "") const;
-    stream lookup (const octave_value& fid, const std::string& who = "") const;
+    OCTINTERP_API stream lookup (int fid, const std::string& who = "") const;
+    OCTINTERP_API stream
+    lookup (const octave_value& fid, const std::string& who = "") const;
 
-    int remove (int fid, const std::string& who = "");
-    int remove (const octave_value& fid, const std::string& who = "");
+    OCTINTERP_API int remove (int fid, const std::string& who = "");
+    OCTINTERP_API int remove (const octave_value& fid, const std::string& who = "");
 
-    void clear (bool flush = true);
+    OCTINTERP_API void clear (bool flush = true);
 
-    string_vector get_info (int fid) const;
-    string_vector get_info (const octave_value& fid) const;
+    OCTINTERP_API string_vector get_info (int fid) const;
+    OCTINTERP_API string_vector get_info (const octave_value& fid) const;
 
-    std::string list_open_files (void) const;
+    OCTINTERP_API std::string list_open_files (void) const;
 
-    octave_value open_file_numbers (void) const;
+    OCTINTERP_API octave_value open_file_numbers (void) const;
 
-    int get_file_number (const octave_value& fid) const;
+    OCTINTERP_API int get_file_number (const octave_value& fid) const;
 
-    octave_value stdin_file (void) const;
-    octave_value stdout_file (void) const;
-    octave_value stderr_file (void) const;
+    OCTINTERP_API octave_value stdin_file (void) const;
+    OCTINTERP_API octave_value stdout_file (void) const;
+    OCTINTERP_API octave_value stderr_file (void) const;
 
   private:
 
--- a/libinterp/corefcn/pager.h	Tue Dec 29 18:06:37 2020 +0100
+++ b/libinterp/corefcn/pager.h	Tue Dec 29 18:15:36 2020 +0100
@@ -129,7 +129,7 @@
     diary_buf *db;
   };
 
-  extern OCTAVE_API void flush_stdout (void);
+  extern OCTINTERP_API void flush_stdout (void);
 
   class output_system
   {
@@ -305,9 +305,9 @@
     void do_sync (const char *msg, int len, bool bypass_pager);
   };
 
-  extern std::ostream& __stdout__ (void);
+  extern OCTINTERP_API std::ostream& __stdout__ (void);
 
-  extern std::ostream& __diary__ (void);
+  extern OCTINTERP_API std::ostream& __diary__ (void);
 }
 
 #define octave_stdout (octave::__stdout__ ())
--- a/libinterp/corefcn/pr-flt-fmt.h	Tue Dec 29 18:06:37 2020 +0100
+++ b/libinterp/corefcn/pr-flt-fmt.h	Tue Dec 29 18:15:36 2020 +0100
@@ -40,11 +40,12 @@
 template <typename T>
 class pr_rational_float;
 
-extern int output_precision (void);
+extern OCTINTERP_API int output_precision (void);
 
-extern void set_output_prec (int prec);
+extern OCTINTERP_API void set_output_prec (int prec);
 
 class
+OCTINTERP_API
 float_format
 {
 public:
@@ -205,6 +206,7 @@
 };
 
 class
+OCTINTERP_API
 float_display_format
 {
 public:
--- a/libinterp/corefcn/syminfo.h	Tue Dec 29 18:06:37 2020 +0100
+++ b/libinterp/corefcn/syminfo.h	Tue Dec 29 18:15:36 2020 +0100
@@ -50,7 +50,9 @@
     std::string line;
   };
 
-  class symbol_info
+  class
+  OCTINTERP_API
+  symbol_info
   {
   public:
 
@@ -85,7 +87,9 @@
     bool m_is_persistent;
   };
 
-  class symbol_info_list : public base_list<symbol_info>
+  class
+  OCTINTERP_API
+  symbol_info_list : public base_list<symbol_info>
   {
   public: