changeset 29234:853e60367cb6

Set API tags in files in libinterp/octave-value (patch #8919). Add API tag to (template) class definitions. Add API tag to (un-defined) functions and member functions in headers.
author Markus Mützel <markus.muetzel@gmx.de>
date Tue, 29 Dec 2020 18:21:12 +0100
parents 665c9ed14c97
children d16d73a050b2
files libinterp/octave-value/cdef-class.h libinterp/octave-value/cdef-manager.h libinterp/octave-value/cdef-method.h libinterp/octave-value/cdef-object.h libinterp/octave-value/cdef-package.h libinterp/octave-value/cdef-property.h libinterp/octave-value/cdef-utils.h libinterp/octave-value/ov-base-diag.h libinterp/octave-value/ov-base-int.h libinterp/octave-value/ov-base-mat.h libinterp/octave-value/ov-base-scalar.h libinterp/octave-value/ov-base-sparse.h libinterp/octave-value/ov-base.h libinterp/octave-value/ov-class.h libinterp/octave-value/ov-classdef.h libinterp/octave-value/ov-colon.h libinterp/octave-value/ov-complex.h libinterp/octave-value/ov-cs-list.h libinterp/octave-value/ov-cx-diag.h libinterp/octave-value/ov-range.h libinterp/octave-value/ov-typeinfo.h libinterp/octave-value/ov.h
diffstat 22 files changed, 960 insertions(+), 808 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/octave-value/cdef-class.h	Tue Dec 29 18:15:36 2020 +0100
+++ b/libinterp/octave-value/cdef-class.h	Tue Dec 29 18:21:12 2020 +0100
@@ -61,7 +61,7 @@
           meta (false)
       { }
 
-      cdef_class_rep (const std::list<cdef_class>& superclasses);
+      OCTINTERP_API cdef_class_rep (const std::list<cdef_class>& superclasses);
 
       cdef_class_rep& operator = (const cdef_class_rep&) = delete;
 
@@ -80,51 +80,57 @@
 
       bool is_sealed (void) const { return get ("Sealed").bool_value (); }
 
-      cdef_method find_method (const std::string& nm, bool local = false);
-
-      void install_method (const cdef_method& meth);
+      OCTINTERP_API cdef_method
+      find_method (const std::string& nm, bool local = false);
 
-      Cell get_methods (bool include_ctor);
+      OCTINTERP_API void
+      install_method (const cdef_method& meth);
 
-      std::map<std::string, cdef_method>
+      OCTINTERP_API Cell
+      get_methods (bool include_ctor);
+
+      OCTINTERP_API std::map<std::string, cdef_method>
       get_method_map (bool only_inherited, bool include_ctor);
 
-      cdef_property find_property (const std::string& nm);
+      OCTINTERP_API cdef_property find_property (const std::string& nm);
 
-      void install_property (const cdef_property& prop);
+      OCTINTERP_API void install_property (const cdef_property& prop);
 
-      Cell get_properties (int mode);
+      OCTINTERP_API Cell get_properties (int mode);
 
-      std::map<std::string, cdef_property> get_property_map (int mode);
+      OCTINTERP_API std::map<std::string, cdef_property>
+      get_property_map (int mode);
 
-      string_vector get_names (void);
+      OCTINTERP_API string_vector get_names (void);
 
       void set_directory (const std::string& dir) { directory = dir; }
 
       std::string get_directory (void) const { return directory; }
 
-      void delete_object (const cdef_object& obj);
+      OCTINTERP_API void delete_object (const cdef_object& obj);
 
-      octave_value_list
+      OCTINTERP_API octave_value_list
       meta_subsref (const std::string& type,
                     const std::list<octave_value_list>& idx, int nargout);
 
-      void meta_release (void);
+      OCTINTERP_API void meta_release (void);
 
       bool meta_accepts_postfix_index (char type) const
       {
         return (type == '(' || type == '.');
       }
 
-      octave_value get_method (const std::string& name) const;
+      OCTINTERP_API octave_value get_method (const std::string& name) const;
 
-      octave_value construct (const octave_value_list& args);
+      OCTINTERP_API octave_value construct (const octave_value_list& args);
 
-      cdef_object construct_object (const octave_value_list& args);
+      OCTINTERP_API cdef_object
+      construct_object (const octave_value_list& args);
 
-      void initialize_object (cdef_object& obj);
+      OCTINTERP_API void initialize_object (cdef_object& obj);
 
-      void run_constructor (cdef_object& obj, const octave_value_list& args);
+      OCTINTERP_API void
+      run_constructor (cdef_object& obj, const octave_value_list& args);
 
       void mark_as_handle_class (void) { handle_class = true; }
 
@@ -157,15 +163,17 @@
 
     private:
 
-      void load_all_methods (void);
+      OCTINTERP_API void load_all_methods (void);
 
-      void find_names (std::set<std::string>& names, bool all);
+      OCTINTERP_API void find_names (std::set<std::string>& names, bool all);
 
-      void find_properties (std::map<std::string,cdef_property>& props,
-                            int mode = 0);
+      OCTINTERP_API void
+      find_properties (std::map<std::string,cdef_property>& props,
+                       int mode = 0);
 
-      void find_methods (std::map<std::string, cdef_method>& meths,
-                         bool only_inherited, bool include_ctor = false);
+      OCTINTERP_API void
+      find_methods (std::map<std::string, cdef_method>& meths,
+                    bool only_inherited, bool include_ctor = false);
 
       cdef_class wrap (void)
       {
@@ -249,7 +257,8 @@
 
     ~cdef_class (void) = default;
 
-    cdef_method find_method (const std::string& nm, bool local = false);
+    OCTINTERP_API cdef_method
+    find_method (const std::string& nm, bool local = false);
 
     void install_method (const cdef_method& meth)
     {
@@ -267,7 +276,7 @@
       return get_rep ()->get_method_map (only_inherited, include_ctor);
     }
 
-    cdef_property find_property (const std::string& nm);
+    OCTINTERP_API cdef_property find_property (const std::string& nm);
 
     void install_property (const cdef_property& prop)
     {
@@ -330,7 +339,7 @@
     //! will fail because each attempt to compute the metaclass of
     //! recursion_class will cause recursion_class to be parsed again.
 
-    static cdef_class
+    static OCTINTERP_API cdef_class
     make_meta_class (interpreter& interp, tree_classdef *t,
                      bool is_at_folder = false);
 
@@ -339,7 +348,7 @@
       return get_rep ()->get_method (nm);
     }
 
-    octave_value get_method_function (const std::string& nm);
+    OCTINTERP_API octave_value get_method_function (const std::string& nm);
 
     octave_value get_constructor_function (void)
     {
@@ -405,11 +414,11 @@
       return dynamic_cast<const cdef_class_rep *> (cdef_object::get_rep ());
     }
 
-    friend bool operator == (const cdef_class&, const cdef_class&);
-    friend bool operator != (const cdef_class&, const cdef_class&);
-    friend bool operator < (const cdef_class&, const cdef_class&);
+    friend OCTINTERP_API bool operator == (const cdef_class&, const cdef_class&);
+    friend OCTINTERP_API bool operator != (const cdef_class&, const cdef_class&);
+    friend OCTINTERP_API bool operator < (const cdef_class&, const cdef_class&);
 
-    friend void install_classdef (interpreter& interp);
+    friend OCTINTERP_API void install_classdef (interpreter& interp);
   };
 
   inline bool
--- a/libinterp/octave-value/cdef-manager.h	Tue Dec 29 18:15:36 2020 +0100
+++ b/libinterp/octave-value/cdef-manager.h	Tue Dec 29 18:21:12 2020 +0100
@@ -42,7 +42,7 @@
   {
   public:
 
-    cdef_manager (interpreter& interp);
+    OCTINTERP_API cdef_manager (interpreter& interp);
 
     // No copying!
 
@@ -52,18 +52,20 @@
 
     ~cdef_manager (void) = default;
 
-    cdef_class find_class (const std::string& name,
-                           bool error_if_not_found = true,
-                           bool load_if_not_found = true);
+    OCTINTERP_API cdef_class
+    find_class (const std::string& name, bool error_if_not_found = true,
+                bool load_if_not_found = true);
 
-    octave_value find_method_symbol (const std::string& method_name,
-                                     const std::string& class_name);
+    OCTINTERP_API octave_value
+    find_method_symbol (const std::string& method_name,
+                        const std::string& class_name);
 
-    cdef_package find_package (const std::string& name,
-                               bool error_if_not_found = true,
-                               bool load_if_not_found = true);
+    OCTINTERP_API cdef_package
+    find_package (const std::string& name, bool error_if_not_found = true,
+                  bool load_if_not_found = true);
 
-    octave_value find_package_symbol (const std::string& pack_name);
+    OCTINTERP_API octave_value
+    find_package_symbol (const std::string& pack_name);
 
     void register_class (const cdef_class& cls)
     {
@@ -92,47 +94,50 @@
 
     const cdef_package& meta (void) const { return m_meta; }
 
-    cdef_class make_class (const std::string& name,
-                           const std::list<cdef_class>& super_list = std::list<cdef_class> ());
+    OCTINTERP_API cdef_class
+    make_class (const std::string& name,
+                const std::list<cdef_class>& super_list = std::list<cdef_class> ());
 
-    cdef_class make_class (const std::string& name, const cdef_class& super);
+    OCTINTERP_API cdef_class
+    make_class (const std::string& name, const cdef_class& super);
 
-    cdef_class make_meta_class (const std::string& name,
-                                const cdef_class& super);
+    OCTINTERP_API cdef_class
+     make_meta_class (const std::string& name, const cdef_class& super);
 
-    cdef_property make_property (const cdef_class& cls,
-                                 const std::string& name,
-                                 const octave_value& get_method = Matrix (),
-                                 const std::string& get_access = "public",
-                                 const octave_value& set_method = Matrix (),
-                                 const std::string& set_access = "public");
+    OCTINTERP_API cdef_property
+    make_property (const cdef_class& cls, const std::string& name,
+                   const octave_value& get_method = Matrix (),
+                   const std::string& get_access = "public",
+                   const octave_value& set_method = Matrix (),
+                   const std::string& set_access = "public");
 
-    cdef_property make_attribute (const cdef_class& cls,
-                                  const std::string& name);
+    OCTINTERP_API cdef_property
+    make_attribute (const cdef_class& cls, const std::string& name);
 
-    cdef_method make_method (const cdef_class& cls,
-                             const std::string& name,
-                             const octave_value& fcn,
-                             const std::string& m_access = "public",
-                             bool is_static = false);
+    OCTINTERP_API cdef_method
+    make_method (const cdef_class& cls, const std::string& name,
+                 const octave_value& fcn,
+                 const std::string& m_access = "public",
+                 bool is_static = false);
 
-    cdef_method make_method (const cdef_class& cls,
-                             const std::string& name,
-                             octave_builtin::fcn ff,
-                             const std::string& m_access = "public",
-                             bool is_static = false);
+    OCTINTERP_API cdef_method
+    make_method (const cdef_class& cls, const std::string& name,
+                 octave_builtin::fcn ff,
+                 const std::string& m_access = "public",
+                 bool is_static = false);
 
-    cdef_method make_method (const cdef_class& cls,
-                             const std::string& name,
-                             octave_builtin::meth mm,
-                             const std::string& m_access = "public",
-                             bool is_static = false);
+    OCTINTERP_API cdef_method
+    make_method (const cdef_class& cls, const std::string& name,
+                 octave_builtin::meth mm,
+                 const std::string& m_access = "public",
+                 bool is_static = false);
 
-    cdef_package make_package (const std::string& nm,
-                               const std::string& parent = "");
+    OCTINTERP_API cdef_package
+    make_package (const std::string& nm, const std::string& parent = "");
 
-    octave_value find_method (const std::string& class_name,
-                              const std::string& name) const;
+    OCTINTERP_API octave_value
+    find_method (const std::string& class_name,
+                 const std::string& name) const;
 
   private:
 
--- a/libinterp/octave-value/cdef-method.h	Tue Dec 29 18:15:36 2020 +0100
+++ b/libinterp/octave-value/cdef-method.h	Tue Dec 29 18:21:12 2020 +0100
@@ -73,9 +73,9 @@
 
       void set_function (const octave_value& fcn) { function = fcn; }
 
-      std::string get_doc_string (void);
+      OCTINTERP_API std::string get_doc_string (void);
 
-      bool check_access (void) const;
+      OCTINTERP_API bool check_access (void) const;
 
       bool is_external (void) const { return ! dispatch_type.empty (); }
 
@@ -84,18 +84,18 @@
         dispatch_type = dtype;
       }
 
-      octave_value_list execute (const octave_value_list& args, int nargout,
-                                 bool do_check_access = true,
-                                 const std::string& who = "");
+      OCTINTERP_API octave_value_list
+      execute (const octave_value_list& args, int nargout,
+               bool do_check_access = true, const std::string& who = "");
 
-      octave_value_list execute (const cdef_object& obj,
-                                 const octave_value_list& args, int nargout,
-                                 bool do_check_access = true,
-                                 const std::string& who = "");
+      OCTINTERP_API octave_value_list
+      execute (const cdef_object& obj,
+               const octave_value_list& args, int nargout,
+               bool do_check_access = true, const std::string& who = "");
 
-      bool is_constructor (void) const;
+      OCTINTERP_API bool is_constructor (void) const;
 
-      bool is_defined_in_class (const std::string& cname) const;
+      OCTINTERP_API bool is_defined_in_class (const std::string& cname) const;
 
       octave_value_list
       meta_subsref (const std::string& type,
@@ -113,7 +113,7 @@
           dispatch_type (m.dispatch_type)
       { }
 
-      void check_method (void);
+      OCTINTERP_API void check_method (void);
 
       cdef_method wrap (void)
       {
--- a/libinterp/octave-value/cdef-object.h	Tue Dec 29 18:15:36 2020 +0100
+++ b/libinterp/octave-value/cdef-object.h	Tue Dec 29 18:21:12 2020 +0100
@@ -48,6 +48,7 @@
   // cdef_object, such that it can contain cdef_object objects.
 
   class
+  OCTINTERP_API
   cdef_object_rep
   {
   public:
@@ -137,7 +138,7 @@
 
     virtual bool is_valid (void) const { return false; }
 
-    std::string class_name (void) const;
+    OCTINTERP_API std::string class_name (void) const;
 
     virtual void mark_for_construction (const cdef_class&)
     {
@@ -173,7 +174,7 @@
 
     virtual void destroy (void) { delete this; }
 
-    void release (const cdef_object& obj);
+    OCTINTERP_API void release (const cdef_object& obj);
 
     virtual dim_vector dims (void) const { return dim_vector (); }
 
@@ -221,7 +222,7 @@
       return *this;
     }
 
-    cdef_class get_class (void) const;
+    OCTINTERP_API cdef_class get_class (void) const;
 
     void set_class (const cdef_class& cls) { rep->set_class (cls); }
 
@@ -293,7 +294,7 @@
 
     string_vector map_keys (void) const { return rep->map_keys (); }
 
-    octave_map map_value (void) const;
+    OCTINTERP_API octave_map map_value (void) const;
 
     const cdef_object_rep * get_rep (void) const { return rep; }
 
@@ -351,16 +352,16 @@
 
     ~cdef_object_base (void) { }
 
-    cdef_class get_class (void) const;
+    OCTINTERP_API cdef_class get_class (void) const;
 
-    void set_class (const cdef_class& cls);
+    OCTINTERP_API void set_class (const cdef_class& cls);
 
     cdef_object_rep * empty_clone (void) const
     {
       return new cdef_object_base (*this);
     }
 
-    cdef_object_rep * make_array (void) const;
+    OCTINTERP_API cdef_object_rep * make_array (void) const;
 
   protected:
 
@@ -403,12 +404,12 @@
 
     Array<cdef_object> array_value (void) const { return array; }
 
-    octave_value_list
+    OCTINTERP_API octave_value_list
     subsref (const std::string& type, const std::list<octave_value_list>& idx,
              int nargout, size_t& skip, const cdef_class& context,
              bool auto_add);
 
-    octave_value
+    OCTINTERP_API octave_value
     subsasgn (const std::string& type, const std::list<octave_value_list>& idx,
               const octave_value& rhs);
 
@@ -434,7 +435,7 @@
 
     void fill_empty_values (void) { fill_empty_values (array); }
 
-    void fill_empty_values (Array<cdef_object>& arr);
+    OCTINTERP_API void fill_empty_values (Array<cdef_object>& arr);
 
     // Private copying!
     cdef_object_array (const cdef_object_array& obj)
@@ -488,24 +489,25 @@
       return get (pname);
     }
 
-    octave_value_list
+    OCTINTERP_API octave_value_list
     subsref (const std::string& type, const std::list<octave_value_list>& idx,
              int nargout, size_t& skip, const cdef_class& context,
              bool auto_add);
 
-    octave_value
+    OCTINTERP_API octave_value
     subsasgn (const std::string& type, const std::list<octave_value_list>& idx,
               const octave_value& rhs);
 
-    void mark_for_construction (const cdef_class&);
+    OCTINTERP_API void mark_for_construction (const cdef_class&);
 
-    bool is_constructed_for (const cdef_class& cls) const;
+    OCTINTERP_API bool is_constructed_for (const cdef_class& cls) const;
 
-    bool is_partially_constructed_for (const cdef_class& cls) const;
+    OCTINTERP_API bool
+    is_partially_constructed_for (const cdef_class& cls) const;
 
     void mark_as_constructed (void) { ctor_list.clear (); }
 
-    void mark_as_constructed (const cdef_class& cls);
+    OCTINTERP_API void mark_as_constructed (const cdef_class& cls);
 
     bool is_constructed (void) const { return ctor_list.empty (); }
 
@@ -534,7 +536,7 @@
 
     handle_cdef_object& operator = (const handle_cdef_object&) = delete;
 
-    ~handle_cdef_object (void);
+    OCTINTERP_API ~handle_cdef_object (void);
 
     cdef_object_rep * clone (void) const
     {
@@ -569,7 +571,7 @@
 
     value_cdef_object& operator = (const value_cdef_object&) = delete;
 
-    ~value_cdef_object (void);
+    OCTINTERP_API ~value_cdef_object (void);
 
     cdef_object_rep * clone (void) const
     {
--- a/libinterp/octave-value/cdef-package.h	Tue Dec 29 18:15:36 2020 +0100
+++ b/libinterp/octave-value/cdef-package.h	Tue Dec 29 18:21:12 2020 +0100
@@ -67,17 +67,20 @@
 
       void set_name (const std::string& nm) { put ("Name", nm); }
 
-      void install_class (const cdef_class& cls, const std::string& nm);
+      OCTINTERP_API void
+      install_class (const cdef_class& cls, const std::string& nm);
 
-      void install_function (const octave_value& fcn, const std::string& nm);
-
-      void install_package (const cdef_package& pack, const std::string& nm);
+      OCTINTERP_API void
+      install_function (const octave_value& fcn, const std::string& nm);
 
-      Cell get_classes (void) const;
+      OCTINTERP_API void
+      install_package (const cdef_package& pack, const std::string& nm);
 
-      Cell get_functions (void) const;
+      OCTINTERP_API Cell get_classes (void) const;
 
-      Cell get_packages (void) const;
+      OCTINTERP_API Cell get_functions (void) const;
+
+      OCTINTERP_API Cell get_packages (void) const;
 
       octave_idx_type static_count (void) const { return member_count; }
 
@@ -96,18 +99,18 @@
           delete this;
       }
 
-      octave_value_list
+      OCTINTERP_API octave_value_list
       meta_subsref (const std::string& type,
                     const std::list<octave_value_list>& idx, int nargout);
 
-      void meta_release (void);
+      OCTINTERP_API void meta_release (void);
 
       bool meta_accepts_postfix_index (char type) const
       {
         return (type == '.');
       }
 
-      octave_value find (const std::string& nm);
+      OCTINTERP_API octave_value find (const std::string& nm);
 
     private:
 
@@ -221,7 +224,7 @@
       return dynamic_cast<const cdef_package_rep *> (cdef_object::get_rep ());
     }
 
-    friend void install_classdef (interpreter& interp);
+    friend OCTINTERP_API void install_classdef (interpreter& interp);
   };
 }
 
--- a/libinterp/octave-value/cdef-property.h	Tue Dec 29 18:15:36 2020 +0100
+++ b/libinterp/octave-value/cdef-property.h	Tue Dec 29 18:21:12 2020 +0100
@@ -82,16 +82,16 @@
                       bool do_check_access = true,
                       const std::string& who = "");
 
-      bool check_get_access (void) const;
+      OCTINTERP_API bool check_get_access (void) const;
 
-      bool check_set_access (void) const;
+      OCTINTERP_API bool check_set_access (void) const;
 
     private:
       cdef_property_rep (const cdef_property_rep& p)
         : cdef_meta_object_rep (p)
       { }
 
-      bool is_recursive_set (const cdef_object& obj) const;
+      OCTINTERP_API bool is_recursive_set (const cdef_object& obj) const;
 
       cdef_property wrap (void)
       {
@@ -99,7 +99,7 @@
         return cdef_property (this);
       }
 
-      OCTAVE_NORETURN
+      OCTINTERP_API OCTAVE_NORETURN
       void err_property_access (const std::string& from,
                                 bool is_set = false) const;
     };
--- a/libinterp/octave-value/cdef-utils.h	Tue Dec 29 18:15:36 2020 +0100
+++ b/libinterp/octave-value/cdef-utils.h	Tue Dec 29 18:21:12 2020 +0100
@@ -39,70 +39,70 @@
   class cdef_class;
   class cdef_package;
 
-  extern std::string
+  extern OCTINTERP_API std::string
   get_base_name (const std::string& nm);
 
-  extern void
+  extern OCTINTERP_API void
   make_function_of_class (const std::string& class_name,
                           const octave_value& fcn);
 
-  extern void
+  extern OCTINTERP_API void
   make_function_of_class (const cdef_class& cls, const octave_value& fcn);
 
-  extern cdef_class
+  extern OCTINTERP_API cdef_class
   lookup_class (const std::string& name, bool error_if_not_found = true,
                 bool load_if_not_found = true);
 
-  extern cdef_class
+  extern OCTINTERP_API cdef_class
   lookup_class (const cdef_class& cls);
 
-  extern cdef_class
+  extern OCTINTERP_API cdef_class
   lookup_class (const octave_value& ov);
 
-  extern std::list<cdef_class>
+  extern OCTINTERP_API std::list<cdef_class>
   lookup_classes (const Cell& cls_list);
 
-  extern octave_value
+  extern OCTINTERP_API octave_value
   to_ov (const cdef_object& obj);
 
-  extern octave_value
+  extern OCTINTERP_API octave_value
   to_ov (const octave_value& ov);
 
-  extern cdef_object
+  extern OCTINTERP_API cdef_object
   to_cdef (const octave_value& val);
 
-  extern cdef_object&
+  extern OCTINTERP_API cdef_object&
   to_cdef_ref (const octave_value& val);
 
-  extern cdef_object
+  extern OCTINTERP_API cdef_object
   to_cdef (const cdef_object& obj);
 
-  extern octave_value
+  extern OCTINTERP_API octave_value
   to_ov (const std::list<cdef_class>& class_list);
 
-  extern bool
+  extern OCTINTERP_API bool
   is_dummy_method (const octave_value& fcn);
 
-  extern bool
+  extern OCTINTERP_API bool
   is_superclass (const cdef_class& clsa, const cdef_class& clsb,
                  bool allow_equal = true, int max_depth = -1);
-  extern bool
+  extern OCTINTERP_API bool
   is_strict_superclass (const cdef_class& clsa, const cdef_class& clsb);
 
-  extern bool
+  extern OCTINTERP_API bool
   is_direct_superclass (const cdef_class& clsa, const cdef_class& clsb);
 
-  extern cdef_package
+  extern OCTINTERP_API cdef_package
   lookup_package (const std::string& name, bool error_if_not_found = true,
                   bool load_if_not_found = true);
 
-  extern cdef_class
+  extern OCTINTERP_API cdef_class
   get_class_context (std::string& name, bool& in_constructor);
 
-  extern cdef_class
+  extern OCTINTERP_API cdef_class
   get_class_context (void);
 
-  extern bool
+  extern OCTINTERP_API bool
   check_access (const cdef_class& cls, const octave_value& acc,
                 const std::string& meth_name = "",
                 const std::string& prop_name = "",
--- a/libinterp/octave-value/ov-base-diag.h	Tue Dec 29 18:15:36 2020 +0100
+++ b/libinterp/octave-value/ov-base-diag.h	Tue Dec 29 18:21:12 2020 +0100
@@ -44,6 +44,7 @@
 
 template <typename DMT, typename MT>
 class
+OCTINTERP_API
 octave_base_diag : public octave_base_value
 {
 
@@ -72,19 +73,19 @@
   // functions.
   using octave_base_value::subsref;
 
-  octave_value subsref (const std::string& type,
-                        const std::list<octave_value_list>& idx);
+  OCTINTERP_API octave_value
+  subsref (const std::string& type, const std::list<octave_value_list>& idx);
 
   octave_value_list subsref (const std::string& type,
                              const std::list<octave_value_list>& idx, int)
   { return subsref (type, idx); }
 
-  octave_value do_index_op (const octave_value_list& idx,
-                            bool resize_ok = false);
+  OCTINTERP_API octave_value
+  do_index_op (const octave_value_list& idx, bool resize_ok = false);
 
-  octave_value subsasgn (const std::string& type,
-                         const std::list<octave_value_list>& idx,
-                         const octave_value& rhs);
+  OCTINTERP_API octave_value
+  subsasgn (const std::string& type, const std::list<octave_value_list>& idx,
+            const octave_value& rhs);
 
   dim_vector dims (void) const { return matrix.dims (); }
 
@@ -103,7 +104,8 @@
       return to_dense ().permute (vec, inv);
   }
 
-  octave_value resize (const dim_vector& dv, bool fill = false) const;
+  OCTINTERP_API octave_value
+  resize (const dim_vector& dv, bool fill = false) const;
 
   octave_value all (int dim = 0) const { return MT (matrix).all (dim); }
   octave_value any (int dim = 0) const { return MT (matrix).any (dim); }
@@ -117,7 +119,7 @@
   // functions.
   using octave_base_value::diag;
 
-  octave_value diag (octave_idx_type k = 0) const;
+  OCTINTERP_API octave_value diag (octave_idx_type k = 0) const;
 
   octave_value sort (octave_idx_type dim = 0, sortmode mode = ASCENDING) const
   { return to_dense ().sort (dim, mode); }
@@ -142,46 +144,50 @@
 
   bool is_constant (void) const { return true; }
 
-  bool is_true (void) const;
+  OCTINTERP_API bool is_true (void) const;
 
   bool is_diag_matrix (void) const { return true; }
 
-  double double_value (bool = false) const;
+  OCTINTERP_API double double_value (bool = false) const;
 
-  float float_value (bool = false) const;
+  OCTINTERP_API float float_value (bool = false) const;
 
   double scalar_value (bool frc_str_conv = false) const
   { return double_value (frc_str_conv); }
 
-  idx_vector index_vector (bool /* require_integers */ = false) const;
+  OCTINTERP_API idx_vector
+  index_vector (bool /* require_integers */ = false) const;
 
-  Matrix matrix_value (bool = false) const;
+  OCTINTERP_API Matrix matrix_value (bool = false) const;
 
-  FloatMatrix float_matrix_value (bool = false) const;
+  OCTINTERP_API FloatMatrix float_matrix_value (bool = false) const;
 
-  Complex complex_value (bool = false) const;
+  OCTINTERP_API Complex complex_value (bool = false) const;
 
-  FloatComplex float_complex_value (bool = false) const;
+  OCTINTERP_API FloatComplex float_complex_value (bool = false) const;
 
-  ComplexMatrix complex_matrix_value (bool = false) const;
+  OCTINTERP_API ComplexMatrix complex_matrix_value (bool = false) const;
 
-  FloatComplexMatrix float_complex_matrix_value (bool = false) const;
+  OCTINTERP_API FloatComplexMatrix
+  float_complex_matrix_value (bool = false) const;
 
-  ComplexNDArray complex_array_value (bool = false) const;
-
-  FloatComplexNDArray float_complex_array_value (bool = false) const;
+  OCTINTERP_API ComplexNDArray complex_array_value (bool = false) const;
 
-  boolNDArray bool_array_value (bool warn = false) const;
+  OCTINTERP_API FloatComplexNDArray
+  float_complex_array_value (bool = false) const;
 
-  charNDArray char_array_value (bool = false) const;
+  OCTINTERP_API boolNDArray bool_array_value (bool warn = false) const;
+
+  OCTINTERP_API charNDArray char_array_value (bool = false) const;
 
-  NDArray array_value (bool = false) const;
+  OCTINTERP_API NDArray array_value (bool = false) const;
 
-  FloatNDArray float_array_value (bool = false) const;
+  OCTINTERP_API FloatNDArray float_array_value (bool = false) const;
 
-  SparseMatrix sparse_matrix_value (bool = false) const;
+  OCTINTERP_API SparseMatrix sparse_matrix_value (bool = false) const;
 
-  SparseComplexMatrix sparse_complex_matrix_value (bool = false) const;
+  OCTINTERP_API SparseComplexMatrix
+  sparse_complex_matrix_value (bool = false) const;
 
   int8NDArray
   int8_array_value (void) const { return to_dense ().int8_array_value (); }
@@ -207,40 +213,45 @@
   uint64NDArray
   uint64_array_value (void) const { return to_dense ().uint64_array_value (); }
 
-  octave_value convert_to_str_internal (bool pad, bool force, char type) const;
+  OCTINTERP_API octave_value
+  convert_to_str_internal (bool pad, bool force, char type) const;
 
-  void print_raw (std::ostream& os, bool pr_as_read_syntax = false) const;
+  OCTINTERP_API void
+  print_raw (std::ostream& os, bool pr_as_read_syntax = false) const;
 
-  float_display_format get_edit_display_format (void) const;
+  OCTINTERP_API float_display_format get_edit_display_format (void) const;
 
-  std::string edit_display (const float_display_format& fmt,
-                            octave_idx_type i, octave_idx_type j) const;
+  OCTINTERP_API std::string
+  edit_display (const float_display_format& fmt,
+                octave_idx_type i, octave_idx_type j) const;
 
-  bool save_ascii (std::ostream& os);
+  OCTINTERP_API bool save_ascii (std::ostream& os);
 
-  bool load_ascii (std::istream& is);
+  OCTINTERP_API bool load_ascii (std::istream& is);
 
-  int write (octave::stream& os, int block_size,
-             oct_data_conv::data_type output_type, int skip,
-             octave::mach_info::float_format flt_fmt) const;
+  OCTINTERP_API int
+  write (octave::stream& os, int block_size,
+         oct_data_conv::data_type output_type, int skip,
+         octave::mach_info::float_format flt_fmt) const;
 
-  mxArray * as_mxArray (bool interleaved) const;
+  OCTINTERP_API mxArray * as_mxArray (bool interleaved) const;
 
-  bool print_as_scalar (void) const;
+  OCTINTERP_API bool print_as_scalar (void) const;
 
-  void print (std::ostream& os, bool pr_as_read_syntax = false);
-
-  void print_info (std::ostream& os, const std::string& prefix) const;
+  OCTINTERP_API void print (std::ostream& os, bool pr_as_read_syntax = false);
 
-  void short_disp (std::ostream& os) const;
+  OCTINTERP_API void
+  print_info (std::ostream& os, const std::string& prefix) const;
 
-  octave_value fast_elem_extract (octave_idx_type n) const;
+  OCTINTERP_API void short_disp (std::ostream& os) const;
+
+  OCTINTERP_API octave_value fast_elem_extract (octave_idx_type n) const;
 
 protected:
 
   DMT matrix;
 
-  octave_value to_dense (void) const;
+  OCTINTERP_API octave_value to_dense (void) const;
 
   virtual bool chk_valid_scalar (const octave_value&,
                                  typename DMT::element_type&) const = 0;
--- a/libinterp/octave-value/ov-base-int.h	Tue Dec 29 18:15:36 2020 +0100
+++ b/libinterp/octave-value/ov-base-int.h	Tue Dec 29 18:21:12 2020 +0100
@@ -46,6 +46,7 @@
 
 template <typename T>
 class
+OCTINTERP_API
 octave_base_int_matrix : public octave_base_matrix<T>
 {
 public:
@@ -62,7 +63,7 @@
   octave_base_value * empty_clone (void) const
   { return new octave_base_int_matrix (); }
 
-  octave_base_value * try_narrowing_conversion (void);
+  OCTINTERP_API octave_base_value * try_narrowing_conversion (void);
 
   bool isreal (void) const { return true; }
 
@@ -70,48 +71,54 @@
 
   //  void decrement (void) { matrix -= 1; }
 
-  void print_raw (std::ostream& os, bool pr_as_read_syntax = false) const;
+  OCTINTERP_API void
+  print_raw (std::ostream& os, bool pr_as_read_syntax = false) const;
 
-  octave_value convert_to_str_internal (bool, bool, char type) const;
+  OCTINTERP_API octave_value
+  convert_to_str_internal (bool, bool, char type) const;
 
-  octave_value as_double (void) const;
-  octave_value as_single (void) const;
+  OCTINTERP_API octave_value as_double (void) const;
+  OCTINTERP_API octave_value as_single (void) const;
 
-  octave_value as_int8 (void) const;
-  octave_value as_int16 (void) const;
-  octave_value as_int32 (void) const;
-  octave_value as_int64 (void) const;
+  OCTINTERP_API octave_value as_int8 (void) const;
+  OCTINTERP_API octave_value as_int16 (void) const;
+  OCTINTERP_API octave_value as_int32 (void) const;
+  OCTINTERP_API octave_value as_int64 (void) const;
 
-  octave_value as_uint8 (void) const;
-  octave_value as_uint16 (void) const;
-  octave_value as_uint32 (void) const;
-  octave_value as_uint64 (void) const;
+  OCTINTERP_API octave_value as_uint8 (void) const;
+  OCTINTERP_API octave_value as_uint16 (void) const;
+  OCTINTERP_API octave_value as_uint32 (void) const;
+  OCTINTERP_API octave_value as_uint64 (void) const;
 
-  std::string edit_display (const float_display_format& fmt,
-                            octave_idx_type i, octave_idx_type j) const;
+  OCTINTERP_API std::string
+  edit_display (const float_display_format& fmt,
+                octave_idx_type i, octave_idx_type j) const;
 
-  bool save_ascii (std::ostream& os);
+  OCTINTERP_API bool save_ascii (std::ostream& os);
 
-  bool load_ascii (std::istream& is);
+  OCTINTERP_API bool load_ascii (std::istream& is);
 
-  bool save_binary (std::ostream& os, bool);
+  OCTINTERP_API bool save_binary (std::ostream& os, bool);
 
-  bool load_binary (std::istream& is, bool swap,
-                    octave::mach_info::float_format);
+  OCTINTERP_API bool
+  load_binary (std::istream& is, bool swap, octave::mach_info::float_format);
 
 protected:
 
-  bool save_hdf5_internal (octave_hdf5_id loc_id, octave_hdf5_id save_type,
-                           const char *name, bool);
+  OCTINTERP_API bool
+  save_hdf5_internal (octave_hdf5_id loc_id, octave_hdf5_id save_type,
+                      const char *name, bool);
 
-  bool load_hdf5_internal (octave_hdf5_id loc_id, octave_hdf5_id save_type,
-                           const char *name);
+  OCTINTERP_API bool
+  load_hdf5_internal (octave_hdf5_id loc_id, octave_hdf5_id save_type,
+                      const char *name);
 };
 
 // base int scalar values.
 
 template <typename T>
 class
+OCTINTERP_API
 octave_base_int_scalar : public octave_base_scalar<T>
 {
 public:
@@ -137,39 +144,43 @@
 
   //  void decrement (void) { scalar -= 1; }
 
-  octave_value convert_to_str_internal (bool, bool, char type) const;
-
-  octave_value as_double (void) const;
-  octave_value as_single (void) const;
+  OCTINTERP_API octave_value
+  convert_to_str_internal (bool, bool, char type) const;
 
-  octave_value as_int8 (void) const;
-  octave_value as_int16 (void) const;
-  octave_value as_int32 (void) const;
-  octave_value as_int64 (void) const;
+  OCTINTERP_API octave_value as_double (void) const;
+  OCTINTERP_API octave_value as_single (void) const;
+
+  OCTINTERP_API octave_value as_int8 (void) const;
+  OCTINTERP_API octave_value as_int16 (void) const;
+  OCTINTERP_API octave_value as_int32 (void) const;
+  OCTINTERP_API octave_value as_int64 (void) const;
 
-  octave_value as_uint8 (void) const;
-  octave_value as_uint16 (void) const;
-  octave_value as_uint32 (void) const;
-  octave_value as_uint64 (void) const;
-
-  std::string edit_display (const float_display_format& fmt,
-                            octave_idx_type i, octave_idx_type j) const;
+  OCTINTERP_API octave_value as_uint8 (void) const;
+  OCTINTERP_API octave_value as_uint16 (void) const;
+  OCTINTERP_API octave_value as_uint32 (void) const;
+  OCTINTERP_API octave_value as_uint64 (void) const;
 
-  bool save_ascii (std::ostream& os);
+  OCTINTERP_API std::string
+  edit_display (const float_display_format& fmt,
+                octave_idx_type i, octave_idx_type j) const;
 
-  bool load_ascii (std::istream& is);
+  OCTINTERP_API bool save_ascii (std::ostream& os);
 
-  bool save_binary (std::ostream& os, bool);
+  OCTINTERP_API bool load_ascii (std::istream& is);
 
-  bool load_binary (std::istream& is, bool swap,
+  OCTINTERP_API bool save_binary (std::ostream& os, bool);
+
+  OCTINTERP_API bool load_binary (std::istream& is, bool swap,
                     octave::mach_info::float_format);
 protected:
 
-  bool save_hdf5_internal (octave_hdf5_id loc_id, octave_hdf5_id save_type,
-                           const char *name, bool);
+  OCTINTERP_API bool
+  save_hdf5_internal (octave_hdf5_id loc_id, octave_hdf5_id save_type,
+                      const char *name, bool);
 
-  bool load_hdf5_internal (octave_hdf5_id loc_id, octave_hdf5_id save_type,
-                           const char *name);
+  OCTINTERP_API bool
+  load_hdf5_internal (octave_hdf5_id loc_id, octave_hdf5_id save_type,
+                      const char *name);
 };
 
 #endif
--- a/libinterp/octave-value/ov-base-mat.h	Tue Dec 29 18:15:36 2020 +0100
+++ b/libinterp/octave-value/ov-base-mat.h	Tue Dec 29 18:21:12 2020 +0100
@@ -46,6 +46,7 @@
 
 template <typename MT>
 class
+OCTINTERP_API
 octave_base_matrix : public octave_base_value
 {
 public:
@@ -84,19 +85,19 @@
   // functions.
   using octave_base_value::subsref;
 
-  octave_value subsref (const std::string& type,
-                        const std::list<octave_value_list>& idx);
+  OCTINTERP_API octave_value
+  subsref (const std::string& type, const std::list<octave_value_list>& idx);
 
   octave_value_list subsref (const std::string& type,
                              const std::list<octave_value_list>& idx, int)
   { return subsref (type, idx); }
 
-  octave_value subsasgn (const std::string& type,
-                         const std::list<octave_value_list>& idx,
-                         const octave_value& rhs);
+  OCTINTERP_API octave_value
+  subsasgn (const std::string& type, const std::list<octave_value_list>& idx,
+            const octave_value& rhs);
 
-  octave_value do_index_op (const octave_value_list& idx,
-                            bool resize_ok = false);
+  OCTINTERP_API octave_value
+  do_index_op (const octave_value_list& idx,  bool resize_ok = false);
 
   // FIXME: should we import the functions from the base class and
   // overload them here, or should we use a different name so we don't
@@ -105,11 +106,12 @@
   // can also cause some confusion.
   using octave_base_value::assign;
 
-  void assign (const octave_value_list& idx, const MT& rhs);
+  OCTINTERP_API void assign (const octave_value_list& idx, const MT& rhs);
 
-  void assign (const octave_value_list& idx, typename MT::element_type rhs);
+  OCTINTERP_API void
+  assign (const octave_value_list& idx, typename MT::element_type rhs);
 
-  void delete_elements (const octave_value_list& idx);
+  OCTINTERP_API void delete_elements (const octave_value_list& idx);
 
   dim_vector dims (void) const { return matrix.dims (); }
 
@@ -162,20 +164,22 @@
 
   bool is_constant (void) const { return true; }
 
-  bool is_true (void) const;
+  OCTINTERP_API bool is_true (void) const;
 
-  bool print_as_scalar (void) const;
+  OCTINTERP_API bool print_as_scalar (void) const;
 
-  void print (std::ostream& os, bool pr_as_read_syntax = false);
+  OCTINTERP_API void print (std::ostream& os, bool pr_as_read_syntax = false);
 
-  void print_info (std::ostream& os, const std::string& prefix) const;
+  OCTINTERP_API void
+  print_info (std::ostream& os, const std::string& prefix) const;
 
-  void short_disp (std::ostream& os) const;
+  OCTINTERP_API void short_disp (std::ostream& os) const;
 
-  float_display_format get_edit_display_format (void) const;
+  OCTINTERP_API float_display_format get_edit_display_format (void) const;
 
-  std::string edit_display (const float_display_format& fmt,
-                            octave_idx_type i, octave_idx_type j) const;
+  OCTINTERP_API std::string
+  edit_display (const float_display_format& fmt,
+                octave_idx_type i, octave_idx_type j) const;
 
   MT& matrix_ref (void)
   {
@@ -188,10 +192,10 @@
     return matrix;
   }
 
-  octave_value
+  OCTINTERP_API octave_value
   fast_elem_extract (octave_idx_type n) const;
 
-  bool
+  OCTINTERP_API bool
   fast_elem_insert (octave_idx_type n, const octave_value& x);
 
 protected:
@@ -218,7 +222,7 @@
 
   // No assignment.
 
-  octave_base_matrix& operator = (const octave_base_matrix&);
+  OCTINTERP_API octave_base_matrix& operator = (const octave_base_matrix&);
 };
 
 #endif
--- a/libinterp/octave-value/ov-base-scalar.h	Tue Dec 29 18:15:36 2020 +0100
+++ b/libinterp/octave-value/ov-base-scalar.h	Tue Dec 29 18:21:12 2020 +0100
@@ -45,6 +45,7 @@
 
 template <typename ST>
 class
+OCTINTERP_API
 octave_base_scalar : public octave_base_value
 {
 public:
@@ -71,22 +72,22 @@
   // functions.
   using octave_base_value::subsref;
 
-  octave_value subsref (const std::string& type,
-                        const std::list<octave_value_list>& idx);
+  OCTINTERP_API octave_value
+  subsref (const std::string& type, const std::list<octave_value_list>& idx);
 
   octave_value_list subsref (const std::string& type,
                              const std::list<octave_value_list>& idx, int)
   { return subsref (type, idx); }
 
-  octave_value subsasgn (const std::string& type,
-                         const std::list<octave_value_list>& idx,
-                         const octave_value& rhs);
+  OCTINTERP_API octave_value
+  subsasgn (const std::string& type, const std::list<octave_value_list>& idx,
+            const octave_value& rhs);
 
   bool is_constant (void) const { return true; }
 
   bool is_defined (void) const { return true; }
 
-  dim_vector dims (void) const;
+  OCTINTERP_API dim_vector dims (void) const;
 
   octave_idx_type numel (void) const { return 1; }
 
@@ -94,9 +95,9 @@
 
   octave_idx_type nnz (void) const { return (scalar != ST () ? 1 : 0); }
 
-  octave_value permute (const Array<int>&, bool = false) const;
+  OCTINTERP_API octave_value permute (const Array<int>&, bool = false) const;
 
-  octave_value reshape (const dim_vector& new_dims) const;
+  OCTINTERP_API octave_value reshape (const dim_vector& new_dims) const;
 
   size_t byte_size (void) const { return sizeof (ST); }
 
@@ -104,9 +105,9 @@
 
   octave_value any (int = 0) const { return (scalar != ST ()); }
 
-  octave_value diag (octave_idx_type k = 0) const;
+  OCTINTERP_API octave_value diag (octave_idx_type k = 0) const;
 
-  octave_value diag (octave_idx_type m, octave_idx_type n) const;
+  OCTINTERP_API octave_value diag (octave_idx_type m, octave_idx_type n) const;
 
   octave_value sort (octave_idx_type, sortmode) const
   { return octave_value (scalar); }
@@ -138,20 +139,23 @@
 
   bool isnumeric (void) const { return true; }
 
-  bool is_true (void) const;
+  OCTINTERP_API bool is_true (void) const;
 
-  void print (std::ostream& os, bool pr_as_read_syntax = false);
+  OCTINTERP_API void print (std::ostream& os, bool pr_as_read_syntax = false);
 
-  void print_raw (std::ostream& os, bool pr_as_read_syntax = false) const;
+  OCTINTERP_API void
+  print_raw (std::ostream& os, bool pr_as_read_syntax = false) const;
 
-  bool print_name_tag (std::ostream& os, const std::string& name) const;
+  OCTINTERP_API bool
+  print_name_tag (std::ostream& os, const std::string& name) const;
 
-  void short_disp (std::ostream& os) const;
+  OCTINTERP_API void short_disp (std::ostream& os) const;
 
-  float_display_format get_edit_display_format (void) const;
+  OCTINTERP_API float_display_format get_edit_display_format (void) const;
 
-  std::string edit_display (const float_display_format& fmt,
-                            octave_idx_type i, octave_idx_type j) const;
+  OCTINTERP_API std::string
+  edit_display (const float_display_format& fmt,
+                octave_idx_type i, octave_idx_type j) const;
 
   // Unsafe.  This function exists to support the MEX interface.
   // You should not use it anywhere else.
@@ -161,9 +165,10 @@
 
   ST& scalar_ref (void) { return scalar; }
 
-  octave_value fast_elem_extract (octave_idx_type n) const;
+  OCTINTERP_API octave_value fast_elem_extract (octave_idx_type n) const;
 
-  bool fast_elem_insert_self (void *where, builtin_type_t btyp) const;
+  OCTINTERP_API bool
+  fast_elem_insert_self (void *where, builtin_type_t btyp) const;
 
 protected:
 
--- a/libinterp/octave-value/ov-base-sparse.h	Tue Dec 29 18:15:36 2020 +0100
+++ b/libinterp/octave-value/ov-base-sparse.h	Tue Dec 29 18:21:12 2020 +0100
@@ -47,6 +47,7 @@
 
 template <typename T>
 class
+OCTINTERP_API
 octave_base_sparse : public octave_base_value
 {
 public:
@@ -91,16 +92,16 @@
   // functions.
   using octave_base_value::subsref;
 
-  octave_value subsref (const std::string& type,
-                        const std::list<octave_value_list>& idx);
+  OCTINTERP_API octave_value
+  subsref (const std::string& type, const std::list<octave_value_list>& idx);
 
   octave_value_list subsref (const std::string& type,
                              const std::list<octave_value_list>& idx, int)
   { return subsref (type, idx); }
 
-  octave_value subsasgn (const std::string& type,
-                         const std::list<octave_value_list>& idx,
-                         const octave_value& rhs);
+  OCTINTERP_API octave_value
+  subsasgn (const std::string& type, const std::list<octave_value_list>& idx,
+            const octave_value& rhs);
 
   // FIXME: should we import the functions from the base class and
   // overload them here, or should we use a different name so we don't
@@ -109,14 +110,14 @@
   // can also cause some confusion.
   using octave_base_value::assign;
 
-  void assign (const octave_value_list& idx, const T& rhs);
+  OCTINTERP_API void assign (const octave_value_list& idx, const T& rhs);
 
-  void delete_elements (const octave_value_list& idx);
+  OCTINTERP_API void delete_elements (const octave_value_list& idx);
 
   dim_vector dims (void) const { return matrix.dims (); }
 
-  octave_value do_index_op (const octave_value_list& idx,
-                            bool resize_ok = false);
+  OCTINTERP_API octave_value
+  do_index_op (const octave_value_list& idx, bool resize_ok = false);
 
   octave_value reshape (const dim_vector& new_dims) const
   { return T (matrix.reshape (new_dims)); }
@@ -124,7 +125,7 @@
   octave_value permute (const Array<int>& vec, bool inv = false) const
   { return T (matrix.permute (vec, inv)); }
 
-  octave_value resize (const dim_vector& dv, bool = false) const;
+  OCTINTERP_API octave_value resize (const dim_vector& dv, bool = false) const;
 
   octave_value all (int dim = 0) const { return matrix.all (dim); }
   octave_value any (int dim = 0) const { return matrix.any (dim); }
@@ -160,24 +161,27 @@
 
   bool is_constant (void) const { return true; }
 
-  bool is_true (void) const;
+  OCTINTERP_API bool is_true (void) const;
 
-  bool print_as_scalar (void) const;
+  OCTINTERP_API bool print_as_scalar (void) const;
 
-  void print (std::ostream& os, bool pr_as_read_syntax = false);
+  OCTINTERP_API void print (std::ostream& os, bool pr_as_read_syntax = false);
 
-  void print_info (std::ostream& os, const std::string& prefix) const;
+  OCTINTERP_API void
+  print_info (std::ostream& os, const std::string& prefix) const;
 
-  void print_raw (std::ostream& os, bool pr_as_read_syntax = false) const;
+  OCTINTERP_API void
+  print_raw (std::ostream& os, bool pr_as_read_syntax = false) const;
 
-  bool save_ascii (std::ostream& os);
+  OCTINTERP_API bool save_ascii (std::ostream& os);
 
-  bool load_ascii (std::istream& is);
+  OCTINTERP_API bool load_ascii (std::istream& is);
+
+  OCTINTERP_API float_display_format get_edit_display_format (void) const;
 
-  float_display_format get_edit_display_format (void) const;
-
-  std::string edit_display (const float_display_format& fmt,
-                            octave_idx_type i, octave_idx_type j) const;
+  OCTINTERP_API std::string
+  edit_display (const float_display_format& fmt,
+                octave_idx_type i, octave_idx_type j) const;
 
   // Unsafe.  These functions exists to support the MEX interface.
   // You should not use them anywhere else.
@@ -187,11 +191,12 @@
 
   octave_idx_type * mex_get_jc (void) const { return matrix.mex_get_jc (); }
 
-  octave_value fast_elem_extract (octave_idx_type n) const;
+  OCTINTERP_API octave_value fast_elem_extract (octave_idx_type n) const;
 
 protected:
 
-  octave_value map (octave_base_value::unary_mapper_t umap) const;
+  OCTINTERP_API octave_value
+  map (octave_base_value::unary_mapper_t umap) const;
 
   T matrix;
 
--- a/libinterp/octave-value/ov-base.h	Tue Dec 29 18:15:36 2020 +0100
+++ b/libinterp/octave-value/ov-base.h	Tue Dec 29 18:21:12 2020 +0100
@@ -50,7 +50,7 @@
   // interpreter-private.h here and bringing in a lot of unnecessary
   // symbols that require even more header files.
 
-  extern type_info& __get_type_info__ (const std::string&);
+  extern OCTINTERP_API type_info& __get_type_info__ (const std::string&);
 }
 
 class Cell;
@@ -876,9 +876,10 @@
 
   // This should only be called for derived types.
 
-  octave_value numeric_assign (const std::string& type,
-                               const std::list<octave_value_list>& idx,
-                               const octave_value& rhs);
+  OCTINTERP_API octave_value
+  numeric_assign (const std::string& type,
+                  const std::list<octave_value_list>& idx,
+                  const octave_value& rhs);
 
   void reset_indent_level (void) const
   { curr_print_indent_level = 0; }
@@ -892,11 +893,11 @@
   int current_print_indent_level (void) const
   { return curr_print_indent_level; }
 
-  void indent (std::ostream& os) const;
+  OCTINTERP_API void indent (std::ostream& os) const;
 
-  void newline (std::ostream& os) const;
+  OCTINTERP_API void newline (std::ostream& os) const;
 
-  void reset (void) const;
+  OCTINTERP_API void reset (void) const;
 
   // A reference count.
   // NOTE: the declaration is octave_idx_type because with 64-bit indexing,
@@ -904,14 +905,14 @@
   // (think of an empty cell array with >2G elements).
   octave::refcount<octave_idx_type> count;
 
-  static const char * get_umap_name (unary_mapper_t);
+  OCTINTERP_API static const char * get_umap_name (unary_mapper_t);
 
-  void warn_load (const char *type) const;
-  void warn_save (const char *type) const;
+  OCTINTERP_API void warn_load (const char *type) const;
+  OCTINTERP_API void warn_save (const char *type) const;
 
 private:
 
-  void wrong_type_arg_error (void) const;
+  OCTINTERP_API void wrong_type_arg_error (void) const;
 
   static int curr_print_indent_level;
   static bool beginning_of_line;
--- a/libinterp/octave-value/ov-class.h	Tue Dec 29 18:15:36 2020 +0100
+++ b/libinterp/octave-value/ov-class.h	Tue Dec 29 18:21:12 2020 +0100
@@ -81,18 +81,18 @@
 
   octave_base_value * clone (void) const { return new octave_class (*this); }
 
-  octave_base_value * unique_clone (void);
+  OCTINTERP_API octave_base_value * unique_clone (void);
 
   octave_base_value * empty_clone (void) const
   {
     return new octave_class (octave_map (map.keys ()), c_name, parent_list);
   }
 
-  Cell dotref (const octave_value_list& idx);
+  OCTINTERP_API Cell dotref (const octave_value_list& idx);
 
-  Matrix size (void);
+  OCTINTERP_API Matrix size (void);
 
-  octave_idx_type xnumel (const octave_value_list&);
+  OCTINTERP_API octave_idx_type xnumel (const octave_value_list&);
 
   // We don't need to override all three forms of subsref.  The using
   // declaration will avoid warnings about partially-overloaded virtual
@@ -106,29 +106,30 @@
     return tmp.length () > 0 ? tmp(0) : octave_value ();
   }
 
-  octave_value_list subsref (const std::string& type,
-                             const std::list<octave_value_list>& idx,
-                             int nargout);
+  OCTINTERP_API octave_value_list
+  subsref (const std::string& type, const std::list<octave_value_list>& idx,
+           int nargout);
 
-  static octave_value numeric_conv (const Cell& val,
-                                    const std::string& type);
+  static OCTINTERP_API octave_value
+  numeric_conv (const Cell& val, const std::string& type);
 
   void assign(const std::string& k, const octave_value& rhs)
   { map.assign (k, rhs); };
 
-  octave_value subsasgn (const std::string& type,
-                         const std::list<octave_value_list>& idx,
-                         const octave_value& rhs);
+  OCTINTERP_API octave_value
+   subsasgn (const std::string& type, const std::list<octave_value_list>& idx,
+             const octave_value& rhs);
 
-  octave_value undef_subsasgn (const std::string& type,
-                               const std::list<octave_value_list>& idx,
-                               const octave_value& rhs);
+  OCTINTERP_API octave_value
+  undef_subsasgn (const std::string& type,
+                  const std::list<octave_value_list>& idx,
+                  const octave_value& rhs);
 
-  idx_vector index_vector (bool require_integers = false) const;
+  OCTINTERP_API idx_vector index_vector (bool require_integers = false) const;
 
   dim_vector dims (void) const { return map.dims (); }
 
-  size_t byte_size (void) const;
+  OCTINTERP_API size_t byte_size (void) const;
 
   // This is the number of elements in each field.  The total number
   // of elements is numel () * nfields ().
@@ -162,11 +163,11 @@
 
   bool isobject (void) const { return true; }
 
-  bool is_true (void) const;
+  OCTINTERP_API bool is_true (void) const;
 
   octave_map map_value (void) const { return map; }
 
-  string_vector map_keys (void) const;
+  OCTINTERP_API string_vector map_keys (void) const;
 
   std::list<std::string> parent_class_name_list (void) const
   { return parent_list; }
@@ -174,38 +175,41 @@
   string_vector parent_class_names (void) const
   { return string_vector (parent_list); }
 
-  octave_base_value * find_parent_class (const std::string&);
+  OCTINTERP_API octave_base_value * find_parent_class (const std::string&);
 
-  octave_base_value * unique_parent_class (const std::string&);
+  OCTINTERP_API octave_base_value * unique_parent_class (const std::string&);
 
-  bool is_instance_of (const std::string&) const;
+  OCTINTERP_API bool is_instance_of (const std::string&) const;
 
-  string_vector string_vector_value (bool pad) const;
+  OCTINTERP_API string_vector string_vector_value (bool pad) const;
 
-  void print (std::ostream& os, bool pr_as_read_syntax = false);
+  OCTINTERP_API void print (std::ostream& os, bool pr_as_read_syntax = false);
 
-  void print_raw (std::ostream& os, bool pr_as_read_syntax = false) const;
+  OCTINTERP_API void print_raw (std::ostream& os, bool pr_as_read_syntax = false) const;
 
-  bool reconstruct_exemplar (void);
+  OCTINTERP_API bool reconstruct_exemplar (void);
 
-  static void clear_exemplar_map (void);
+  OCTINTERP_API static void clear_exemplar_map (void);
+
+  OCTINTERP_API bool reconstruct_parents (void);
 
-  bool reconstruct_parents (void);
-
-  bool save_ascii (std::ostream& os);
+  OCTINTERP_API bool save_ascii (std::ostream& os);
 
-  bool load_ascii (std::istream& is);
+  OCTINTERP_API bool load_ascii (std::istream& is);
 
-  bool save_binary (std::ostream& os, bool save_as_floats);
+  OCTINTERP_API bool save_binary (std::ostream& os, bool save_as_floats);
 
-  bool load_binary (std::istream& is, bool swap,
-                    octave::mach_info::float_format fmt);
+  OCTINTERP_API bool
+  load_binary (std::istream& is, bool swap,
+               octave::mach_info::float_format fmt);
 
-  bool save_hdf5 (octave_hdf5_id loc_id, const char *name, bool save_as_floats);
+  OCTINTERP_API bool
+  save_hdf5 (octave_hdf5_id loc_id, const char *name, bool save_as_floats);
 
-  bool load_hdf5 (octave_hdf5_id loc_id, const char *name);
+  OCTINTERP_API bool
+  load_hdf5 (octave_hdf5_id loc_id, const char *name);
 
-  mxArray * as_mxArray (bool interleaved) const;
+  OCTINTERP_API mxArray * as_mxArray (bool interleaved) const;
 
 private:
   octave_map map;
@@ -218,7 +222,7 @@
   static int static_type_id (void) { return t_id; }
   static std::string static_type_name (void) { return t_name; }
   static std::string static_class_name (void) { return "<unknown>"; }
-  static void register_type (octave::type_info&);
+  static OCTINTERP_API void register_type (octave::type_info&);
 
 private:
   static int t_id;
@@ -227,13 +231,13 @@
   std::string c_name;
   std::list<std::string> parent_list;
 
-  bool in_class_method (void);
-  std::string get_current_method_class (void);
+  OCTINTERP_API bool in_class_method (void);
+  OCTINTERP_API std::string get_current_method_class (void);
 
-  octave_value subsasgn_common (const octave_value& obj,
-                                const std::string& type,
-                                const std::list<octave_value_list>& idx,
-                                const octave_value& rhs);
+  OCTINTERP_API octave_value
+  subsasgn_common (const octave_value& obj, const std::string& type,
+                   const std::list<octave_value_list>& idx,
+                   const octave_value& rhs);
 
   int obsolete_copies;
 
@@ -246,7 +250,7 @@
 
     exemplar_info (void) : field_names (), parent_class_names () { }
 
-    exemplar_info (const octave_value& obj);
+    OCTINTERP_API exemplar_info (const octave_value& obj);
 
     exemplar_info (const exemplar_info& x)
       : field_names (x.field_names),
@@ -270,7 +274,7 @@
 
     std::list<std::string> parents (void) const { return parent_class_names; }
 
-    bool compare (const octave_value& obj) const;
+    OCTINTERP_API bool compare (const octave_value& obj) const;
 
   private:
 
--- a/libinterp/octave-value/ov-classdef.h	Tue Dec 29 18:15:36 2020 +0100
+++ b/libinterp/octave-value/ov-classdef.h	Tue Dec 29 18:21:12 2020 +0100
@@ -83,15 +83,16 @@
 
   bool is_classdef_object (void) const { return true; }
 
-  void print (std::ostream& os, bool pr_as_read_syntax = false);
+  OCTINTERP_API void print (std::ostream& os, bool pr_as_read_syntax = false);
 
-  void print_raw (std::ostream& os, bool pr_as_read_syntax = false) const;
+  OCTINTERP_API void
+  print_raw (std::ostream& os, bool pr_as_read_syntax = false) const;
 
-  bool is_instance_of (const std::string& cls_name) const;
+  OCTINTERP_API bool is_instance_of (const std::string& cls_name) const;
 
-  octave_value_list subsref (const std::string& type,
-                             const std::list<octave_value_list>& idx,
-                             int nargout);
+  OCTINTERP_API octave_value_list
+  subsref (const std::string& type, const std::list<octave_value_list>& idx,
+           int nargout);
 
   octave_value subsref (const std::string& type,
                         const std::list<octave_value_list>& idx)
@@ -100,22 +101,22 @@
     return (retval.length () > 0 ? retval(0) : octave_value ());
   }
 
-  octave_value subsref (const std::string& type,
-                        const std::list<octave_value_list>& idx,
-                        bool auto_add);
+  OCTINTERP_API octave_value
+  subsref (const std::string& type, const std::list<octave_value_list>& idx,
+           bool auto_add);
 
-  octave_value subsasgn (const std::string& type,
-                         const std::list<octave_value_list>& idx,
-                         const octave_value& rhs);
+  OCTINTERP_API octave_value
+  subsasgn (const std::string& type, const std::list<octave_value_list>& idx,
+            const octave_value& rhs);
 
-  octave_value
+  OCTINTERP_API octave_value
   undef_subsasgn (const std::string& type,
                   const std::list<octave_value_list>& idx,
                   const octave_value& rhs);
 
-  Matrix size (void);
+  OCTINTERP_API Matrix size (void);
 
-  octave_idx_type xnumel (const octave_value_list&);
+  OCTINTERP_API octave_idx_type xnumel (const octave_value_list&);
 
   string_vector map_keys (void) const { return object.map_keys (); }
 
@@ -135,10 +136,10 @@
     return object.get_property (idx, name);
   }
 
-  static octave_value superclass_ref (const std::string& meth,
-                                      const std::string& cls);
+  static OCTINTERP_API octave_value
+  superclass_ref (const std::string& meth, const std::string& cls);
 
-  static octave_value metaclass_query (const std::string& cls);
+  static OCTINTERP_API octave_value metaclass_query (const std::string& cls);
 
 public:
 
@@ -149,7 +150,7 @@
   static int static_type_id (void) { return t_id; }
   static std::string static_type_name (void) { return t_name; }
   static std::string static_class_name (void) { return "<unknown>"; }
-  static void register_type (octave::type_info&);
+  static OCTINTERP_API void register_type (octave::type_info&);
 
 private:
 
@@ -218,11 +219,12 @@
   bool accepts_postfix_index (char type) const
   { return object.meta_accepts_postfix_index (type); }
 
-  bool is_classdef_method (const std::string& cname = "") const;
+  OCTINTERP_API bool is_classdef_method (const std::string& cname = "") const;
 
-  bool is_classdef_constructor (const std::string& cname = "") const;
+  OCTINTERP_API bool
+  is_classdef_constructor (const std::string& cname = "") const;
 
-  std::string doc_string (const std::string& meth_name) const;
+  OCTINTERP_API std::string doc_string (const std::string& meth_name) const;
 
 private:
 
@@ -258,13 +260,14 @@
     return execute (tw, nargout, args);
   }
 
-  octave_value_list execute (octave::tree_evaluator& tw, int nargout,
-                             const octave_value_list& idx);
+  OCTINTERP_API octave_value_list
+  execute (octave::tree_evaluator& tw, int nargout,
+           const octave_value_list& idx);
 
 private:
 
-  bool is_constructed_object (octave::tree_evaluator& tw,
-                              const std::string& nm);
+  OCTINTERP_API bool
+  is_constructed_object (octave::tree_evaluator& tw, const std::string& nm);
 
 private:
 
--- a/libinterp/octave-value/ov-colon.h	Tue Dec 29 18:15:36 2020 +0100
+++ b/libinterp/octave-value/ov-colon.h	Tue Dec 29 18:21:12 2020 +0100
@@ -70,9 +70,9 @@
 
   bool is_magic_colon (void) const { return true; }
 
-  void print (std::ostream& os, bool pr_as_read_syntax = false);
+  OCTINTERP_API void print (std::ostream& os, bool pr_as_read_syntax = false);
 
-  void print_raw (std::ostream& os, bool pr_as_read_syntax = false) const;
+  OCTINTERP_API void print_raw (std::ostream& os, bool pr_as_read_syntax = false) const;
 
 private:
 
--- a/libinterp/octave-value/ov-complex.h	Tue Dec 29 18:15:36 2020 +0100
+++ b/libinterp/octave-value/ov-complex.h	Tue Dec 29 18:21:12 2020 +0100
@@ -101,9 +101,9 @@
 
   bool isfloat (void) const { return true; }
 
-  double double_value (bool = false) const;
+  OCTINTERP_API double double_value (bool = false) const;
 
-  float float_value (bool = false) const;
+  OCTINTERP_API float float_value (bool = false) const;
 
   double scalar_value (bool frc_str_conv = false) const
   { return double_value (frc_str_conv); }
@@ -111,13 +111,13 @@
   float float_scalar_value (bool frc_str_conv = false) const
   { return float_value (frc_str_conv); }
 
-  Matrix matrix_value (bool = false) const;
+  OCTINTERP_API Matrix matrix_value (bool = false) const;
 
-  FloatMatrix float_matrix_value (bool = false) const;
+  OCTINTERP_API FloatMatrix float_matrix_value (bool = false) const;
 
-  NDArray array_value (bool = false) const;
+  OCTINTERP_API NDArray array_value (bool = false) const;
 
-  FloatNDArray float_array_value (bool = false) const;
+  OCTINTERP_API FloatNDArray float_array_value (bool = false) const;
 
   SparseMatrix sparse_matrix_value (bool = false) const
   { return SparseMatrix (matrix_value ()); }
@@ -125,19 +125,22 @@
   SparseComplexMatrix sparse_complex_matrix_value (bool = false) const
   { return SparseComplexMatrix (complex_matrix_value ()); }
 
-  octave_value resize (const dim_vector& dv, bool fill = false) const;
+  OCTINTERP_API octave_value
+  resize (const dim_vector& dv, bool fill = false) const;
 
-  Complex complex_value (bool = false) const;
+  OCTINTERP_API Complex complex_value (bool = false) const;
 
-  FloatComplex float_complex_value (bool = false) const;
+  OCTINTERP_API FloatComplex float_complex_value (bool = false) const;
 
-  ComplexMatrix complex_matrix_value (bool = false) const;
+  OCTINTERP_API ComplexMatrix complex_matrix_value (bool = false) const;
 
-  FloatComplexMatrix float_complex_matrix_value (bool = false) const;
+  OCTINTERP_API FloatComplexMatrix
+  float_complex_matrix_value (bool = false) const;
 
-  ComplexNDArray complex_array_value (bool = false) const;
+  OCTINTERP_API ComplexNDArray complex_array_value (bool = false) const;
 
-  FloatComplexNDArray float_complex_array_value (bool = false) const;
+  OCTINTERP_API FloatComplexNDArray
+  float_complex_array_value (bool = false) const;
 
   bool bool_value (bool warn = false) const
   {
@@ -159,32 +162,34 @@
     return boolNDArray (dim_vector (1, 1), scalar != 0.0);
   }
 
-  octave_value as_double (void) const;
-  octave_value as_single (void) const;
+  OCTINTERP_API octave_value as_double (void) const;
+  OCTINTERP_API octave_value as_single (void) const;
 
   // We don't need to override both forms of the diag method.  The using
   // declaration will avoid warnings about partially-overloaded virtual
   // functions.
   using octave_base_scalar<Complex>::diag;
 
-  octave_value diag (octave_idx_type m, octave_idx_type n) const;
+  OCTINTERP_API octave_value diag (octave_idx_type m, octave_idx_type n) const;
 
   void increment (void) { scalar += 1.0; }
 
   void decrement (void) { scalar -= 1.0; }
 
-  bool save_ascii (std::ostream& os);
+  OCTINTERP_API bool save_ascii (std::ostream& os);
 
-  bool load_ascii (std::istream& is);
+  OCTINTERP_API bool load_ascii (std::istream& is);
 
-  bool save_binary (std::ostream& os, bool save_as_floats);
+  OCTINTERP_API bool save_binary (std::ostream& os, bool save_as_floats);
 
-  bool load_binary (std::istream& is, bool swap,
-                    octave::mach_info::float_format fmt);
+  OCTINTERP_API bool
+  load_binary (std::istream& is, bool swap,
+               octave::mach_info::float_format fmt);
 
-  bool save_hdf5 (octave_hdf5_id loc_id, const char *name, bool save_as_floats);
+  OCTINTERP_API bool
+  save_hdf5 (octave_hdf5_id loc_id, const char *name, bool save_as_floats);
 
-  bool load_hdf5 (octave_hdf5_id loc_id, const char *name);
+  OCTINTERP_API bool load_hdf5 (octave_hdf5_id loc_id, const char *name);
 
   int write (octave::stream& os, int block_size,
              oct_data_conv::data_type output_type, int skip,
@@ -195,9 +200,9 @@
                      skip, flt_fmt);
   }
 
-  mxArray * as_mxArray (bool interleaved) const;
+  OCTINTERP_API mxArray * as_mxArray (bool interleaved) const;
 
-  octave_value map (unary_mapper_t umap) const;
+  OCTINTERP_API octave_value map (unary_mapper_t umap) const;
 
 private:
 
--- a/libinterp/octave-value/ov-cs-list.h	Tue Dec 29 18:15:36 2020 +0100
+++ b/libinterp/octave-value/ov-cs-list.h	Tue Dec 29 18:21:12 2020 +0100
@@ -79,11 +79,12 @@
   // functions.
   using octave_base_value::subsref;
 
-  octave_value subsref (const std::string& type,
-                        const std::list<octave_value_list>& idx);
+  OCTINTERP_API octave_value
+  subsref (const std::string& type, const std::list<octave_value_list>& idx);
 
-  octave_value_list subsref (const std::string& type,
-                             const std::list<octave_value_list>& idx, int);
+  OCTINTERP_API octave_value_list
+  subsref (const std::string& type, const std::list<octave_value_list>& idx,
+           int);
 
 private:
 
--- a/libinterp/octave-value/ov-cx-diag.h	Tue Dec 29 18:15:36 2020 +0100
+++ b/libinterp/octave-value/ov-cx-diag.h	Tue Dec 29 18:21:12 2020 +0100
@@ -36,7 +36,6 @@
 // Real diagonal matrix values.
 
 class
-OCTINTERP_API
 octave_complex_diag_matrix
   : public octave_base_diag<ComplexDiagMatrix, ComplexMatrix>
 {
@@ -58,11 +57,11 @@
   octave_base_value * empty_clone (void) const
   { return new octave_complex_diag_matrix (); }
 
-  type_conv_info numeric_conversion_function (void) const;
+  OCTINTERP_API type_conv_info numeric_conversion_function (void) const;
 
-  type_conv_info numeric_demotion_function (void) const;
+  OCTINTERP_API type_conv_info numeric_demotion_function (void) const;
 
-  octave_base_value * try_narrowing_conversion (void);
+  OCTINTERP_API octave_base_value * try_narrowing_conversion (void);
 
   builtin_type_t builtin_type (void) const { return btyp_complex; }
 
@@ -74,28 +73,30 @@
 
   bool isfloat (void) const { return true; }
 
-  DiagMatrix diag_matrix_value (bool = false) const;
+  OCTINTERP_API DiagMatrix diag_matrix_value (bool = false) const;
 
-  FloatDiagMatrix float_diag_matrix_value (bool = false) const;
+  OCTINTERP_API FloatDiagMatrix float_diag_matrix_value (bool = false) const;
 
-  ComplexDiagMatrix complex_diag_matrix_value (bool = false) const;
+  OCTINTERP_API ComplexDiagMatrix
+  complex_diag_matrix_value (bool = false) const;
 
-  FloatComplexDiagMatrix float_complex_diag_matrix_value (bool = false) const;
+  OCTINTERP_API FloatComplexDiagMatrix
+  float_complex_diag_matrix_value (bool = false) const;
 
-  octave_value as_double (void) const;
-  octave_value as_single (void) const;
+  OCTINTERP_API octave_value as_double (void) const;
+  OCTINTERP_API octave_value as_single (void) const;
 
-  bool save_binary (std::ostream& os, bool save_as_floats);
+  OCTINTERP_API bool save_binary (std::ostream& os, bool save_as_floats);
 
-  bool load_binary (std::istream& is, bool swap,
-                    octave::mach_info::float_format fmt);
+  OCTINTERP_API bool
+  load_binary (std::istream& is, bool swap,
+               octave::mach_info::float_format fmt);
 
-  octave_value map (unary_mapper_t umap) const;
+  OCTINTERP_API octave_value map (unary_mapper_t umap) const;
 
 private:
 
-  bool chk_valid_scalar (const octave_value&,
-                         Complex&) const;
+  OCTINTERP_API bool chk_valid_scalar (const octave_value&, Complex&) const;
 
   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
 };
--- a/libinterp/octave-value/ov-range.h	Tue Dec 29 18:15:36 2020 +0100
+++ b/libinterp/octave-value/ov-range.h	Tue Dec 29 18:21:12 2020 +0100
@@ -97,9 +97,9 @@
     return new typename octave_value_range_traits<T>::matrix_type ();
   }
 
-  type_conv_info numeric_conversion_function (void) const;
+  OCTINTERP_API type_conv_info numeric_conversion_function (void) const;
 
-  octave_base_value * try_narrowing_conversion (void);
+  OCTINTERP_API octave_base_value * try_narrowing_conversion (void);
 
   builtin_type_t builtin_type (void) const { return class_to_btyp<T>::btyp; }
 
@@ -115,10 +115,10 @@
                              const std::list<octave_value_list>& idx, int)
   { return subsref (type, idx); }
 
-  octave_value do_index_op (const octave_value_list& idx,
-                            bool resize_ok = false);
+  OCTINTERP_API octave_value
+  do_index_op (const octave_value_list& idx, bool resize_ok = false);
 
-  idx_vector index_vector (bool require_integers = false) const;
+  OCTINTERP_API idx_vector index_vector (bool require_integers = false) const;
 
   dim_vector dims (void) const
   {
@@ -136,7 +136,8 @@
     return tmp.nnz ();
   }
 
-  octave_value resize (const dim_vector& dv, bool fill = false) const;
+  OCTINTERP_API octave_value
+  resize (const dim_vector& dv, bool fill = false) const;
 
   size_t byte_size (void) const { return 3 * sizeof (T); }
 
@@ -263,9 +264,9 @@
 
   Array<T> raw_array_value (void) const { return m_range.array_value (); }
 
-  double double_value (bool = false) const;
+  OCTINTERP_API double double_value (bool = false) const;
 
-  float float_value (bool = false) const;
+  OCTINTERP_API float float_value (bool = false) const;
 
   double scalar_value (bool frc_str_conv = false) const
   {
@@ -297,7 +298,7 @@
     return raw_array_value ();
   }
 
-  charNDArray char_array_value (bool = false) const;
+  OCTINTERP_API charNDArray char_array_value (bool = false) const;
 
   // FIXME: it would be better to have Range::intXNDArray_value
   // functions to avoid the intermediate conversion to a matrix
@@ -353,11 +354,11 @@
     return SparseComplexMatrix (complex_matrix_value ());
   }
 
-  Complex complex_value (bool = false) const;
+  OCTINTERP_API Complex complex_value (bool = false) const;
 
-  FloatComplex float_complex_value (bool = false) const;
+  OCTINTERP_API FloatComplex float_complex_value (bool = false) const;
 
-  boolNDArray bool_array_value (bool warn = false) const;
+  OCTINTERP_API boolNDArray bool_array_value (bool warn = false) const;
 
   ComplexMatrix complex_matrix_value (bool = false) const
   {
@@ -379,66 +380,72 @@
     return raw_array_value ();
   }
 
-  octave::range<float> float_range_value (void) const;
+  OCTINTERP_API octave::range<float> float_range_value (void) const;
 
-  octave::range<double> range_value (void) const;
+  OCTINTERP_API octave::range<double> range_value (void) const;
 
-  octave::range<octave_int8> int8_range_value (void) const;
+  OCTINTERP_API octave::range<octave_int8> int8_range_value (void) const;
 
-  octave::range<octave_int16> int16_range_value (void) const;
+  OCTINTERP_API octave::range<octave_int16> int16_range_value (void) const;
 
-  octave::range<octave_int32> int32_range_value (void) const;
+  OCTINTERP_API octave::range<octave_int32> int32_range_value (void) const;
 
-  octave::range<octave_int64> int64_range_value (void) const;
+  OCTINTERP_API octave::range<octave_int64> int64_range_value (void) const;
 
-  octave::range<octave_uint8> uint8_range_value (void) const;
+  OCTINTERP_API octave::range<octave_uint8> uint8_range_value (void) const;
 
-  octave::range<octave_uint16> uint16_range_value (void) const;
-
-  octave::range<octave_uint32> uint32_range_value (void) const;
+  OCTINTERP_API octave::range<octave_uint16> uint16_range_value (void) const;
 
-  octave::range<octave_uint64> uint64_range_value (void) const;
+  OCTINTERP_API octave::range<octave_uint32> uint32_range_value (void) const;
 
-  octave_value convert_to_str_internal (bool pad, bool force, char type) const;
+  OCTINTERP_API octave::range<octave_uint64> uint64_range_value (void) const;
 
-  octave_value as_double (void) const;
-  octave_value as_single (void) const;
+  OCTINTERP_API octave_value
+  convert_to_str_internal (bool pad, bool force, char type) const;
 
-  octave_value as_int8 (void) const;
-  octave_value as_int16 (void) const;
-  octave_value as_int32 (void) const;
-  octave_value as_int64 (void) const;
+  OCTINTERP_API octave_value as_double (void) const;
+  OCTINTERP_API octave_value as_single (void) const;
+
+  OCTINTERP_API octave_value as_int8 (void) const;
+  OCTINTERP_API octave_value as_int16 (void) const;
+  OCTINTERP_API octave_value as_int32 (void) const;
+  OCTINTERP_API octave_value as_int64 (void) const;
 
-  octave_value as_uint8 (void) const;
-  octave_value as_uint16 (void) const;
-  octave_value as_uint32 (void) const;
-  octave_value as_uint64 (void) const;
+  OCTINTERP_API octave_value as_uint8 (void) const;
+  OCTINTERP_API octave_value as_uint16 (void) const;
+  OCTINTERP_API octave_value as_uint32 (void) const;
+  OCTINTERP_API octave_value as_uint64 (void) const;
 
-  void print (std::ostream& os, bool pr_as_read_syntax = false);
+  OCTINTERP_API void print (std::ostream& os, bool pr_as_read_syntax = false);
 
-  void print_raw (std::ostream& os, bool pr_as_read_syntax = false) const;
-
-  bool print_name_tag (std::ostream& os, const std::string& name) const;
+  OCTINTERP_API void
+  print_raw (std::ostream& os, bool pr_as_read_syntax = false) const;
 
-  void short_disp (std::ostream& os) const;
+  OCTINTERP_API bool
+  print_name_tag (std::ostream& os, const std::string& name) const;
 
-  float_display_format get_edit_display_format (void) const;
+  OCTINTERP_API void short_disp (std::ostream& os) const;
+
+  OCTINTERP_API float_display_format get_edit_display_format (void) const;
 
-  std::string edit_display (const float_display_format& fmt,
-                            octave_idx_type i, octave_idx_type j) const;
+  OCTINTERP_API std::string
+  edit_display (const float_display_format& fmt,
+                octave_idx_type i, octave_idx_type j) const;
 
-  bool save_ascii (std::ostream& os);
+  OCTINTERP_API bool save_ascii (std::ostream& os);
 
-  bool load_ascii (std::istream& is);
+  OCTINTERP_API bool load_ascii (std::istream& is);
 
-  bool save_binary (std::ostream& os, bool save_as_floats);
+  OCTINTERP_API bool save_binary (std::ostream& os, bool save_as_floats);
 
-  bool load_binary (std::istream& is, bool swap,
-                    octave::mach_info::float_format fmt);
+  OCTINTERP_API bool
+  load_binary (std::istream& is, bool swap,
+               octave::mach_info::float_format fmt);
 
-  bool save_hdf5 (octave_hdf5_id loc_id, const char *name, bool flag);
+  OCTINTERP_API bool
+  save_hdf5 (octave_hdf5_id loc_id, const char *name, bool flag);
 
-  bool load_hdf5 (octave_hdf5_id loc_id, const char *name);
+  OCTINTERP_API bool load_hdf5 (octave_hdf5_id loc_id, const char *name);
 
   int write (octave::stream& os, int block_size,
              oct_data_conv::data_type output_type, int skip,
@@ -450,7 +457,7 @@
     return os.write (matrix_value (), block_size, output_type, skip, flt_fmt);
   }
 
-  mxArray * as_mxArray (bool interleaved) const;
+  OCTINTERP_API mxArray * as_mxArray (bool interleaved) const;
 
   octave_value map (unary_mapper_t umap) const
   {
@@ -458,7 +465,7 @@
     return tmp.map (umap);
   }
 
-  octave_value fast_elem_extract (octave_idx_type n) const;
+  OCTINTERP_API octave_value fast_elem_extract (octave_idx_type n) const;
 
 protected:
 
@@ -497,54 +504,54 @@
 // Specializations.
 
 template <>
-octave::range<float>
+OCTINTERP_API octave::range<float>
 ov_range<float>::float_range_value (void) const;
 
 template <>
-octave::range<double>
+OCTINTERP_API octave::range<double>
 ov_range<double>::range_value (void) const;
 
 template <>
-octave::range<octave_int8>
+OCTINTERP_API octave::range<octave_int8>
 ov_range<octave_int8>::int8_range_value (void) const;
 
 template <>
-octave::range<octave_int16>
+OCTINTERP_API octave::range<octave_int16>
 ov_range<octave_int16>::int16_range_value (void) const;
 
 template <>
-octave::range<octave_int32>
+OCTINTERP_API octave::range<octave_int32>
 ov_range<octave_int32>::int32_range_value (void) const;
 
 template <>
-octave::range<octave_int64>
+OCTINTERP_API octave::range<octave_int64>
 ov_range<octave_int64>::int64_range_value (void) const;
 
 template <>
-octave::range<octave_uint8>
+OCTINTERP_API octave::range<octave_uint8>
 ov_range<octave_uint8>::uint8_range_value (void) const;
 
 template <>
-octave::range<octave_uint16>
+OCTINTERP_API octave::range<octave_uint16>
 ov_range<octave_uint16>::uint16_range_value (void) const;
 
 template <>
-octave::range<octave_uint32>
+OCTINTERP_API octave::range<octave_uint32>
 ov_range<octave_uint32>::uint32_range_value (void) const;
 
 template <>
-octave::range<octave_uint64>
+OCTINTERP_API octave::range<octave_uint64>
 ov_range<octave_uint64>::uint64_range_value (void) const;
 
 // The following specializations are here to preserve previous Range
 // performance until solutions can be generalized for other types.
 
 template <>
-idx_vector
+OCTINTERP_API idx_vector
 ov_range<double>::index_vector (bool require_integers) const;
 
 template <>
-octave_idx_type
+OCTINTERP_API octave_idx_type
 ov_range<double>::nnz (void) const;
 
 // The following specialization is also historical baggage.  For double
@@ -553,15 +560,15 @@
 // objects.
 
 template <>
-octave_value
+OCTINTERP_API octave_value
 ov_range<double>::diag (octave_idx_type k) const;
 
 template <>
-octave_value
+OCTINTERP_API octave_value
 ov_range<double>::diag (octave_idx_type nr, octave_idx_type nc) const;
 
 template <>
-void
+OCTINTERP_API void
 ov_range<double>::print_raw (std::ostream& os, bool pr_as_read_syntax) const;
 
 
--- a/libinterp/octave-value/ov-typeinfo.h	Tue Dec 29 18:15:36 2020 +0100
+++ b/libinterp/octave-value/ov-typeinfo.h	Tue Dec 29 18:21:12 2020 +0100
@@ -39,7 +39,9 @@
 
 namespace octave
 {
-  class type_info
+  class
+  OCTINTERP_API
+  type_info
   {
   public:
 
@@ -285,47 +287,49 @@
 
   typedef octave::type_info::assignany_op_fcn assignany_op_fcn;
 
-  extern int register_type (const std::string& t_name,
+  extern OCTINTERP_API int register_type (const std::string& t_name,
                             const std::string& c_name,
                             const octave_value& val);
 
-  extern octave_value lookup_type (const std::string& nm);
+  extern OCTINTERP_API octave_value lookup_type (const std::string& nm);
 
-  extern unary_class_op_fcn lookup_unary_class_op (octave_value::unary_op op);
+  extern OCTINTERP_API unary_class_op_fcn
+  lookup_unary_class_op (octave_value::unary_op op);
 
-  extern unary_op_fcn lookup_unary_op (octave_value::unary_op op, int t);
+  extern OCTINTERP_API unary_op_fcn
+  lookup_unary_op (octave_value::unary_op op, int t);
 
-  extern non_const_unary_op_fcn
+  extern OCTINTERP_API non_const_unary_op_fcn
   lookup_non_const_unary_op (octave_value::unary_op op, int t);
 
-  extern binary_class_op_fcn
+  extern OCTINTERP_API binary_class_op_fcn
   lookup_binary_class_op (octave_value::binary_op op);
 
-  extern binary_op_fcn
+  extern OCTINTERP_API binary_op_fcn
   lookup_binary_op (octave_value::binary_op op, int t1, int t2);
 
-  extern binary_class_op_fcn
+  extern OCTINTERP_API binary_class_op_fcn
   lookup_binary_class_op (octave_value::compound_binary_op op);
 
-  extern binary_op_fcn
+  extern OCTINTERP_API binary_op_fcn
   lookup_binary_op (octave_value::compound_binary_op op, int t1, int t2);
 
-  extern cat_op_fcn lookup_cat_op (int t1, int t2);
+  extern OCTINTERP_API cat_op_fcn lookup_cat_op (int t1, int t2);
 
-  extern assign_op_fcn
+  extern OCTINTERP_API assign_op_fcn
   lookup_assign_op (octave_value::assign_op op, int t_lhs, int t_rhs);
 
-  extern assignany_op_fcn
+  extern OCTINTERP_API assignany_op_fcn
   lookup_assignany_op (octave_value::assign_op op, int t_lhs);
 
-  extern int lookup_pref_assign_conv (int t_lhs, int t_rhs);
+  extern OCTINTERP_API int lookup_pref_assign_conv (int t_lhs, int t_rhs);
 
-  extern octave_base_value::type_conv_fcn
+  extern OCTINTERP_API octave_base_value::type_conv_fcn
   lookup_widening_op (int t, int t_result);
 
-  extern string_vector installed_type_names (void);
+  extern OCTINTERP_API string_vector installed_type_names (void);
 
-  extern octave_scalar_map installed_type_info (void);
+  extern OCTINTERP_API octave_scalar_map installed_type_info (void);
 }
 
 #endif
--- a/libinterp/octave-value/ov.h	Tue Dec 29 18:15:36 2020 +0100
+++ b/libinterp/octave-value/ov.h	Tue Dec 29 18:21:12 2020 +0100
@@ -144,22 +144,23 @@
     unknown_assign_op
   };
 
-  static binary_op assign_op_to_binary_op (assign_op);
+  static OCTINTERP_API binary_op assign_op_to_binary_op (assign_op);
 
-  static assign_op binary_op_to_assign_op (binary_op);
+  static OCTINTERP_API assign_op binary_op_to_assign_op (binary_op);
 
-  static std::string unary_op_as_string (unary_op);
-  static std::string unary_op_fcn_name (unary_op);
+  static OCTINTERP_API std::string unary_op_as_string (unary_op);
+  static OCTINTERP_API std::string unary_op_fcn_name (unary_op);
 
-  static std::string binary_op_as_string (binary_op);
-  static std::string binary_op_fcn_name (binary_op);
+  static OCTINTERP_API std::string binary_op_as_string (binary_op);
+  static OCTINTERP_API std::string binary_op_fcn_name (binary_op);
 
-  static std::string binary_op_fcn_name (compound_binary_op);
+  static OCTINTERP_API std::string binary_op_fcn_name (compound_binary_op);
 
-  static std::string assign_op_as_string (assign_op);
+  static OCTINTERP_API std::string assign_op_as_string (assign_op);
 
-  static octave_value empty_conv (const std::string& type,
-                                  const octave_value& rhs = octave_value ());
+  static OCTINTERP_API octave_value
+  empty_conv (const std::string& type,
+              const octave_value& rhs = octave_value ());
 
   enum magic_colon { magic_colon_t };
 
@@ -169,12 +170,12 @@
     rep->count++;
   }
 
-  octave_value (short int i);
-  octave_value (unsigned short int i);
-  octave_value (int i);
-  octave_value (unsigned int i);
-  octave_value (long int i);
-  octave_value (unsigned long int i);
+  OCTINTERP_API octave_value (short int i);
+  OCTINTERP_API octave_value (unsigned short int i);
+  OCTINTERP_API octave_value (int i);
+  OCTINTERP_API octave_value (unsigned int i);
+  OCTINTERP_API octave_value (long int i);
+  OCTINTERP_API octave_value (unsigned long int i);
 
   // FIXME: These are kluges.  They turn into doubles internally, which will
   // break for very large values.  We just use them to store things like
@@ -182,127 +183,148 @@
   // than can be represented exactly in a double.
 
 #if defined (OCTAVE_HAVE_LONG_LONG_INT)
-  octave_value (long long int i);
+  OCTINTERP_API octave_value (long long int i);
 #endif
 #if defined (OCTAVE_HAVE_UNSIGNED_LONG_LONG_INT)
-  octave_value (unsigned long long int i);
+  OCTINTERP_API octave_value (unsigned long long int i);
 #endif
 
-  octave_value (octave::sys::time t);
-  octave_value (double d);
-  octave_value (float d);
-  octave_value (const Array<octave_value>& a, bool is_cs_list = false);
-  octave_value (const Cell& c, bool is_cs_list = false);
-  octave_value (const Matrix& m, const MatrixType& t = MatrixType ());
-  octave_value (const FloatMatrix& m, const MatrixType& t = MatrixType ());
-  octave_value (const NDArray& nda);
-  octave_value (const FloatNDArray& nda);
-  octave_value (const Array<double>& m);
-  octave_value (const Array<float>& m);
-  octave_value (const DiagMatrix& d);
-  octave_value (const DiagArray2<double>& d);
-  octave_value (const DiagArray2<float>& d);
-  octave_value (const DiagArray2<Complex>& d);
-  octave_value (const DiagArray2<FloatComplex>& d);
-  octave_value (const FloatDiagMatrix& d);
-  octave_value (const RowVector& v);
-  octave_value (const FloatRowVector& v);
-  octave_value (const ColumnVector& v);
-  octave_value (const FloatColumnVector& v);
-  octave_value (const Complex& C);
-  octave_value (const FloatComplex& C);
-  octave_value (const ComplexMatrix& m, const MatrixType& t = MatrixType ());
-  octave_value (const FloatComplexMatrix& m,
-                const MatrixType& t = MatrixType ());
-  octave_value (const ComplexNDArray& cnda);
-  octave_value (const FloatComplexNDArray& cnda);
-  octave_value (const Array<Complex>& m);
-  octave_value (const Array<FloatComplex>& m);
-  octave_value (const ComplexDiagMatrix& d);
-  octave_value (const FloatComplexDiagMatrix& d);
-  octave_value (const ComplexRowVector& v);
-  octave_value (const FloatComplexRowVector& v);
-  octave_value (const ComplexColumnVector& v);
-  octave_value (const FloatComplexColumnVector& v);
-  octave_value (const PermMatrix& p);
-  octave_value (bool b);
-  octave_value (const boolMatrix& bm, const MatrixType& t = MatrixType ());
-  octave_value (const boolNDArray& bnda);
-  octave_value (const Array<bool>& bnda);
-  octave_value (char c, char type = '\'');
-  octave_value (const char *s, char type = '\'');
-  octave_value (const std::string& s, char type = '\'');
-  octave_value (const string_vector& s, char type = '\'');
-  octave_value (const charMatrix& chm,  char type = '\'');
-  octave_value (const charNDArray& chnda, char type = '\'');
-  octave_value (const Array<char>& chnda, char type = '\'');
+  OCTINTERP_API octave_value (octave::sys::time t);
+  OCTINTERP_API octave_value (double d);
+  OCTINTERP_API octave_value (float d);
+  OCTINTERP_API octave_value (const Array<octave_value>& a,
+                              bool is_cs_list = false);
+  OCTINTERP_API octave_value (const Cell& c, bool is_cs_list = false);
+  OCTINTERP_API octave_value (const Matrix& m,
+                              const MatrixType& t = MatrixType ());
+  OCTINTERP_API octave_value (const FloatMatrix& m,
+                              const MatrixType& t = MatrixType ());
+  OCTINTERP_API octave_value (const NDArray& nda);
+  OCTINTERP_API octave_value (const FloatNDArray& nda);
+  OCTINTERP_API octave_value (const Array<double>& m);
+  OCTINTERP_API octave_value (const Array<float>& m);
+  OCTINTERP_API octave_value (const DiagMatrix& d);
+  OCTINTERP_API octave_value (const DiagArray2<double>& d);
+  OCTINTERP_API octave_value (const DiagArray2<float>& d);
+  OCTINTERP_API octave_value (const DiagArray2<Complex>& d);
+  OCTINTERP_API octave_value (const DiagArray2<FloatComplex>& d);
+  OCTINTERP_API octave_value (const FloatDiagMatrix& d);
+  OCTINTERP_API octave_value (const RowVector& v);
+  OCTINTERP_API octave_value (const FloatRowVector& v);
+  OCTINTERP_API octave_value (const ColumnVector& v);
+  OCTINTERP_API octave_value (const FloatColumnVector& v);
+  OCTINTERP_API octave_value (const Complex& C);
+  OCTINTERP_API octave_value (const FloatComplex& C);
+  OCTINTERP_API octave_value (const ComplexMatrix& m,
+                              const MatrixType& t = MatrixType ());
+  OCTINTERP_API octave_value (const FloatComplexMatrix& m,
+                              const MatrixType& t = MatrixType ());
+  OCTINTERP_API octave_value (const ComplexNDArray& cnda);
+  OCTINTERP_API octave_value (const FloatComplexNDArray& cnda);
+  OCTINTERP_API octave_value (const Array<Complex>& m);
+  OCTINTERP_API octave_value (const Array<FloatComplex>& m);
+  OCTINTERP_API octave_value (const ComplexDiagMatrix& d);
+  OCTINTERP_API octave_value (const FloatComplexDiagMatrix& d);
+  OCTINTERP_API octave_value (const ComplexRowVector& v);
+  OCTINTERP_API octave_value (const FloatComplexRowVector& v);
+  OCTINTERP_API octave_value (const ComplexColumnVector& v);
+  OCTINTERP_API octave_value (const FloatComplexColumnVector& v);
+  OCTINTERP_API octave_value (const PermMatrix& p);
+  OCTINTERP_API octave_value (bool b);
+  OCTINTERP_API octave_value (const boolMatrix& bm,
+                              const MatrixType& t = MatrixType ());
+  OCTINTERP_API octave_value (const boolNDArray& bnda);
+  OCTINTERP_API octave_value (const Array<bool>& bnda);
+  OCTINTERP_API octave_value (char c, char type = '\'');
+  OCTINTERP_API octave_value (const char *s, char type = '\'');
+  OCTINTERP_API octave_value (const std::string& s, char type = '\'');
+  OCTINTERP_API octave_value (const string_vector& s, char type = '\'');
+  OCTINTERP_API octave_value (const charMatrix& chm,  char type = '\'');
+  OCTINTERP_API octave_value (const charNDArray& chnda, char type = '\'');
+  OCTINTERP_API octave_value (const Array<char>& chnda, char type = '\'');
 
-  octave_value (const SparseMatrix& m, const MatrixType& t = MatrixType ());
-  octave_value (const Sparse<double>& m, const MatrixType& t = MatrixType ());
-  octave_value (const SparseComplexMatrix& m,
-                const MatrixType& t = MatrixType ());
-  octave_value (const Sparse<Complex>& m, const MatrixType& t = MatrixType ());
-  octave_value (const SparseBoolMatrix& bm,
-                const MatrixType& t = MatrixType ());
-  octave_value (const Sparse<bool>& m, const MatrixType& t = MatrixType ());
-  octave_value (const octave_int8& i);
-  octave_value (const octave_int16& i);
-  octave_value (const octave_int32& i);
-  octave_value (const octave_int64& i);
-  octave_value (const octave_uint8& i);
-  octave_value (const octave_uint16& i);
-  octave_value (const octave_uint32& i);
-  octave_value (const octave_uint64& i);
-  octave_value (const int8NDArray& inda);
-  octave_value (const Array<octave_int8>& inda);
-  octave_value (const int16NDArray& inda);
-  octave_value (const Array<octave_int16>& inda);
-  octave_value (const int32NDArray& inda);
-  octave_value (const Array<octave_int32>& inda);
-  octave_value (const int64NDArray& inda);
-  octave_value (const Array<octave_int64>& inda);
-  octave_value (const uint8NDArray& inda);
-  octave_value (const Array<octave_uint8>& inda);
-  octave_value (const uint16NDArray& inda);
-  octave_value (const Array<octave_uint16>& inda);
-  octave_value (const uint32NDArray& inda);
-  octave_value (const Array<octave_uint32>& inda);
-  octave_value (const uint64NDArray& inda);
-  octave_value (const Array<octave_uint64>& inda);
-  octave_value (const Array<octave_idx_type>& inda,
-                bool zero_based = false, bool cache_index = false);
-  octave_value (const Array<std::string>& cellstr);
-  octave_value (const idx_vector& idx, bool lazy = true);
+  OCTINTERP_API octave_value (const SparseMatrix& m,
+                              const MatrixType& t = MatrixType ());
+  OCTINTERP_API octave_value (const Sparse<double>& m,
+                              const MatrixType& t = MatrixType ());
+  OCTINTERP_API octave_value (const SparseComplexMatrix& m,
+                              const MatrixType& t = MatrixType ());
+  OCTINTERP_API octave_value (const Sparse<Complex>& m,
+                              const MatrixType& t = MatrixType ());
+  OCTINTERP_API octave_value (const SparseBoolMatrix& bm,
+                              const MatrixType& t = MatrixType ());
+  OCTINTERP_API octave_value (const Sparse<bool>& m,
+                              const MatrixType& t = MatrixType ());
+  OCTINTERP_API octave_value (const octave_int8& i);
+  OCTINTERP_API octave_value (const octave_int16& i);
+  OCTINTERP_API octave_value (const octave_int32& i);
+  OCTINTERP_API octave_value (const octave_int64& i);
+  OCTINTERP_API octave_value (const octave_uint8& i);
+  OCTINTERP_API octave_value (const octave_uint16& i);
+  OCTINTERP_API octave_value (const octave_uint32& i);
+  OCTINTERP_API octave_value (const octave_uint64& i);
+  OCTINTERP_API octave_value (const int8NDArray& inda);
+  OCTINTERP_API octave_value (const Array<octave_int8>& inda);
+  OCTINTERP_API octave_value (const int16NDArray& inda);
+  OCTINTERP_API octave_value (const Array<octave_int16>& inda);
+  OCTINTERP_API octave_value (const int32NDArray& inda);
+  OCTINTERP_API octave_value (const Array<octave_int32>& inda);
+  OCTINTERP_API octave_value (const int64NDArray& inda);
+  OCTINTERP_API octave_value (const Array<octave_int64>& inda);
+  OCTINTERP_API octave_value (const uint8NDArray& inda);
+  OCTINTERP_API octave_value (const Array<octave_uint8>& inda);
+  OCTINTERP_API octave_value (const uint16NDArray& inda);
+  OCTINTERP_API octave_value (const Array<octave_uint16>& inda);
+  OCTINTERP_API octave_value (const uint32NDArray& inda);
+  OCTINTERP_API octave_value (const Array<octave_uint32>& inda);
+  OCTINTERP_API octave_value (const uint64NDArray& inda);
+  OCTINTERP_API octave_value (const Array<octave_uint64>& inda);
+  OCTINTERP_API octave_value (const Array<octave_idx_type>& inda,
+                              bool zero_based = false,
+                              bool cache_index = false);
+  OCTINTERP_API octave_value (const Array<std::string>& cellstr);
+  OCTINTERP_API octave_value (const idx_vector& idx, bool lazy = true);
   OCTAVE_DEPRECATED (7, "use 'octave_value (range<double>&)' instead")
-  octave_value (double base, double limit, double inc);
+  OCTINTERP_API octave_value (double base, double limit, double inc);
   OCTAVE_DEPRECATED (7, "use 'octave_value (range<double>&)' instead")
-  octave_value (const Range& r, bool force_range = false);
-  octave_value (const octave::range<char>& r, char type, bool force_range = false);
-  octave_value (const octave::range<float>& r, bool force_range = false);
-  octave_value (const octave::range<double>& r, bool force_range = false);
-  octave_value (const octave::range<octave_int8>& r, bool force_range = false);
-  octave_value (const octave::range<octave_int16>& r, bool force_range = false);
-  octave_value (const octave::range<octave_int32>& r, bool force_range = false);
-  octave_value (const octave::range<octave_int64>& r, bool force_range = false);
-  octave_value (const octave::range<octave_uint8>& r, bool force_range = false);
-  octave_value (const octave::range<octave_uint16>& r, bool force_range = false);
-  octave_value (const octave::range<octave_uint32>& r, bool force_range = false);
-  octave_value (const octave::range<octave_uint64>& r, bool force_range = false);
-  octave_value (const octave_map& m);
-  octave_value (const octave_scalar_map& m);
-  octave_value (const std::map<std::string, octave_value>&);
-  octave_value (const octave_map& m, const std::string& id,
-                const std::list<std::string>& plist);
-  octave_value (const octave_scalar_map& m, const std::string& id,
-                const std::list<std::string>& plist);
+  OCTINTERP_API octave_value (const Range& r, bool force_range = false);
+  OCTINTERP_API octave_value (const octave::range<char>& r, char type,
+                              bool force_range = false);
+  OCTINTERP_API octave_value (const octave::range<float>& r,
+                              bool force_range = false);
+  OCTINTERP_API octave_value (const octave::range<double>& r,
+                              bool force_range = false);
+  OCTINTERP_API octave_value (const octave::range<octave_int8>& r,
+                              bool force_range = false);
+  OCTINTERP_API octave_value (const octave::range<octave_int16>& r,
+                              bool force_range = false);
+  OCTINTERP_API octave_value (const octave::range<octave_int32>& r,
+                              bool force_range = false);
+  OCTINTERP_API octave_value (const octave::range<octave_int64>& r,
+                              bool force_range = false);
+  OCTINTERP_API octave_value (const octave::range<octave_uint8>& r,
+                              bool force_range = false);
+  OCTINTERP_API octave_value (const octave::range<octave_uint16>& r,
+                              bool force_range = false);
+  OCTINTERP_API octave_value (const octave::range<octave_uint32>& r,
+                              bool force_range = false);
+  OCTINTERP_API octave_value (const octave::range<octave_uint64>& r,
+                              bool force_range = false);
+  OCTINTERP_API octave_value (const octave_map& m);
+  OCTINTERP_API octave_value (const octave_scalar_map& m);
+  OCTINTERP_API octave_value (const std::map<std::string, octave_value>&);
+  OCTINTERP_API octave_value (const octave_map& m, const std::string& id,
+                              const std::list<std::string>& plist);
+  OCTINTERP_API octave_value (const octave_scalar_map& m, const std::string& id,
+                              const std::list<std::string>& plist);
 
   // This one is explicit because it can cause some trouble to
   // accidentally create a cs-list when one was not intended.
-  explicit octave_value (const octave_value_list& m);
+  explicit OCTINTERP_API octave_value (const octave_value_list& m);
 
-  octave_value (octave_value::magic_colon);
+  OCTINTERP_API octave_value (octave_value::magic_colon);
 
-  octave_value (octave_base_value *new_rep, bool borrow = false);
+  OCTINTERP_API octave_value (octave_base_value *new_rep, bool borrow = false);
 
   // Copy constructor.
 
@@ -320,7 +342,7 @@
 
   // This should only be called for derived types.
 
-  octave_base_value * clone (void) const;
+  OCTINTERP_API octave_base_value * clone (void) const;
 
   octave_base_value * empty_clone (void) const
   { return rep->empty_clone (); }
@@ -408,7 +430,7 @@
   octave_base_value::type_conv_info numeric_demotion_function (void) const
   { return rep->numeric_demotion_function (); }
 
-  void maybe_mutate (void);
+  OCTINTERP_API void maybe_mutate (void);
 
   octave_value squeeze (void) const
   { return rep->squeeze (); }
@@ -447,8 +469,8 @@
   // FIXME: Do we really need all these different versions of subsref
   // and related functions?
 
-  octave_value single_subsref (const std::string& type,
-                               const octave_value_list& idx);
+  OCTINTERP_API octave_value
+  single_subsref (const std::string& type, const octave_value_list& idx);
 
   octave_value subsref (const std::string& type,
                         const std::list<octave_value_list>& idx)
@@ -459,22 +481,21 @@
                         bool auto_add)
   { return rep->subsref (type, idx, auto_add); }
 
-  octave_value_list subsref (const std::string& type,
-                             const std::list<octave_value_list>& idx,
-                             int nargout);
+  OCTINTERP_API octave_value_list
+  subsref (const std::string& type, const std::list<octave_value_list>& idx,
+           int nargout);
 
-  octave_value next_subsref (const std::string& type, const
-                             std::list<octave_value_list>& idx,
-                             size_t skip = 1);
+  OCTINTERP_API octave_value
+  next_subsref (const std::string& type,
+                const std::list<octave_value_list>& idx, size_t skip = 1);
 
-  octave_value_list next_subsref (int nargout,
-                                  const std::string& type, const
-                                  std::list<octave_value_list>& idx,
-                                  size_t skip = 1);
+  OCTINTERP_API octave_value_list
+  next_subsref (int nargout, const std::string& type,
+                const std::list<octave_value_list>& idx, size_t skip = 1);
 
-  octave_value next_subsref (bool auto_add, const std::string& type, const
-                             std::list<octave_value_list>& idx,
-                             size_t skip = 1);
+  OCTINTERP_API octave_value
+  next_subsref (bool auto_add, const std::string& type,
+                const std::list<octave_value_list>& idx, size_t skip = 1);
 
   octave_value index_op (const octave_value_list& idx, bool resize_ok = false)
   {
@@ -488,19 +509,20 @@
     return index_op (idx, resize_ok);
   }
 
-  octave_value subsasgn (const std::string& type,
-                         const std::list<octave_value_list>& idx,
-                         const octave_value& rhs);
+  OCTINTERP_API octave_value
+  subsasgn (const std::string& type, const std::list<octave_value_list>& idx,
+            const octave_value& rhs);
 
-  octave_value undef_subsasgn (const std::string& type,
-                               const std::list<octave_value_list>& idx,
-                               const octave_value& rhs);
+  OCTINTERP_API octave_value
+  undef_subsasgn (const std::string& type,
+                  const std::list<octave_value_list>& idx,
+                  const octave_value& rhs);
 
-  octave_value& assign (assign_op op, const std::string& type,
-                        const std::list<octave_value_list>& idx,
-                        const octave_value& rhs);
+  OCTINTERP_API octave_value&
+  assign (assign_op op, const std::string& type,
+          const std::list<octave_value_list>& idx, const octave_value& rhs);
 
-  octave_value& assign (assign_op, const octave_value& rhs);
+  OCTINTERP_API octave_value& assign (assign_op, const octave_value& rhs);
 
   idx_vector index_vector (bool require_integers = false) const
   {
@@ -511,13 +533,13 @@
 
   dim_vector dims (void) const { return rep->dims (); }
 
-  std::string get_dims_str (void) const;
+  OCTINTERP_API std::string get_dims_str (void) const;
 
   octave_idx_type rows (void) const { return rep->rows (); }
 
   octave_idx_type columns (void) const { return rep->columns (); }
 
-  octave_idx_type length (void) const;
+  OCTINTERP_API octave_idx_type length (void) const;
 
   int ndims (void) const { return rep->ndims (); }
 
@@ -980,9 +1002,9 @@
   octave::range<octave_uint64> uint64_range_value (void) const
   { return rep->uint64_range_value (); }
 
-  octave_map map_value (void) const;
+  OCTINTERP_API octave_map map_value (void) const;
 
-  octave_scalar_map scalar_map_value (void) const;
+  OCTINTERP_API octave_scalar_map scalar_map_value (void) const;
 
   string_vector map_keys (void) const
   { return rep->map_keys (); }
@@ -1003,67 +1025,80 @@
   bool is_instance_of (const std::string& cls_name) const
   { return rep->is_instance_of (cls_name); }
 
-  octave_classdef * classdef_object_value (bool silent = false) const;
+  OCTINTERP_API octave_classdef *
+  classdef_object_value (bool silent = false) const;
 
-  octave_function * function_value (bool silent = false) const;
+  OCTINTERP_API octave_function *
+  function_value (bool silent = false) const;
 
-  octave_user_function * user_function_value (bool silent = false) const;
+  OCTINTERP_API octave_user_function *
+  user_function_value (bool silent = false) const;
 
-  octave_user_script * user_script_value (bool silent = false) const;
+  OCTINTERP_API octave_user_script *
+  user_script_value (bool silent = false) const;
 
-  octave_user_code * user_code_value (bool silent = false) const;
+  OCTINTERP_API octave_user_code * user_code_value (bool silent = false) const;
 
-  octave_fcn_handle * fcn_handle_value (bool silent = false) const;
+  OCTINTERP_API octave_fcn_handle *
+  fcn_handle_value (bool silent = false) const;
 
-  octave_value_list list_value (void) const;
+  OCTINTERP_API octave_value_list list_value (void) const;
 
-  ColumnVector column_vector_value (bool frc_str_conv = false,
-                                    bool frc_vec_conv = false) const;
+  OCTINTERP_API ColumnVector
+  column_vector_value (bool frc_str_conv = false,
+                       bool frc_vec_conv = false) const;
 
-  ComplexColumnVector
+  OCTINTERP_API ComplexColumnVector
   complex_column_vector_value (bool frc_str_conv = false,
                                bool frc_vec_conv = false) const;
 
-  RowVector row_vector_value (bool frc_str_conv = false,
-                              bool frc_vec_conv = false) const;
+  OCTINTERP_API RowVector
+  row_vector_value (bool frc_str_conv = false,
+                    bool frc_vec_conv = false) const;
 
-  ComplexRowVector
+  OCTINTERP_API ComplexRowVector
   complex_row_vector_value (bool frc_str_conv = false,
                             bool frc_vec_conv = false) const;
 
-  FloatColumnVector float_column_vector_value (bool frc_str_conv = false,
-                                               bool frc_vec_conv = false) const;
+  OCTINTERP_API FloatColumnVector
+  float_column_vector_value (bool frc_str_conv = false,
+                             bool frc_vec_conv = false) const;
 
-  FloatComplexColumnVector
+  OCTINTERP_API FloatComplexColumnVector
   float_complex_column_vector_value (bool frc_str_conv = false,
                                      bool frc_vec_conv = false) const;
 
-  FloatRowVector float_row_vector_value (bool frc_str_conv = false,
-                                         bool frc_vec_conv = false) const;
+  OCTINTERP_API FloatRowVector
+  float_row_vector_value (bool frc_str_conv = false,
+                          bool frc_vec_conv = false) const;
 
-  FloatComplexRowVector
+  OCTINTERP_API FloatComplexRowVector
   float_complex_row_vector_value (bool frc_str_conv = false,
                                   bool frc_vec_conv = false) const;
 
-  Array<int> int_vector_value (bool req_int = false,
-                               bool frc_str_conv = false,
-                               bool frc_vec_conv = false) const;
+  OCTINTERP_API Array<int>
+  int_vector_value (bool req_int = false,
+                    bool frc_str_conv = false,
+                    bool frc_vec_conv = false) const;
 
-  Array<octave_idx_type>
+  OCTINTERP_API Array<octave_idx_type>
   octave_idx_type_vector_value (bool req_int = false,
                                 bool frc_str_conv = false,
                                 bool frc_vec_conv = false) const;
 
-  Array<double> vector_value (bool frc_str_conv = false,
-                              bool frc_vec_conv = false) const;
+  OCTINTERP_API Array<double>
+  vector_value (bool frc_str_conv = false,
+                bool frc_vec_conv = false) const;
 
-  Array<Complex> complex_vector_value (bool frc_str_conv = false,
-                                       bool frc_vec_conv = false) const;
+  OCTINTERP_API Array<Complex>
+  complex_vector_value (bool frc_str_conv = false,
+                        bool frc_vec_conv = false) const;
 
-  Array<float> float_vector_value (bool frc_str_conv = false,
-                                   bool frc_vec_conv = false) const;
+  OCTINTERP_API Array<float>
+  float_vector_value (bool frc_str_conv = false,
+                      bool frc_vec_conv = false) const;
 
-  Array<FloatComplex>
+  OCTINTERP_API Array<FloatComplex>
   float_complex_vector_value (bool frc_str_conv = false,
                               bool frc_vec_conv = false) const;
 
@@ -1075,183 +1110,216 @@
   // specific types and display error messages that are more meaningful than
   // the generic "error: wrong type argument 'cell'" message.
 
-  short int xshort_value (const char *fmt, ...) const;
+  OCTINTERP_API short int xshort_value (const char *fmt, ...) const;
 
-  unsigned short int xushort_value (const char *fmt, ...) const;
+  OCTINTERP_API unsigned short int xushort_value (const char *fmt, ...) const;
 
-  int xint_value (const char *fmt, ...) const;
+  OCTINTERP_API int xint_value (const char *fmt, ...) const;
 
-  unsigned int xuint_value (const char *fmt, ...) const;
+  OCTINTERP_API unsigned int xuint_value (const char *fmt, ...) const;
+
+  OCTINTERP_API int xnint_value (const char *fmt, ...) const;
 
-  int xnint_value (const char *fmt, ...) const;
+  OCTINTERP_API long int xlong_value (const char *fmt, ...) const;
 
-  long int xlong_value (const char *fmt, ...) const;
+  OCTINTERP_API unsigned long int xulong_value (const char *fmt, ...) const;
 
-  unsigned long int xulong_value (const char *fmt, ...) const;
+  OCTINTERP_API int64_t xint64_value (const char *fmt, ...) const;
 
-  int64_t xint64_value (const char *fmt, ...) const;
+  OCTINTERP_API uint64_t xuint64_value (const char *fmt, ...) const;
+
+  OCTINTERP_API octave_idx_type xidx_type_value (const char *fmt, ...) const;
 
-  uint64_t xuint64_value (const char *fmt, ...) const;
+  OCTINTERP_API double xdouble_value (const char *fmt, ...) const;
 
-  octave_idx_type xidx_type_value (const char *fmt, ...) const;
+  OCTINTERP_API float xfloat_value (const char *fmt, ...) const;
 
-  double xdouble_value (const char *fmt, ...) const;
+  OCTINTERP_API double xscalar_value (const char *fmt, ...) const;
 
-  float xfloat_value (const char *fmt, ...) const;
+  OCTINTERP_API float xfloat_scalar_value (const char *fmt, ...) const;
+
+  OCTINTERP_API Matrix xmatrix_value (const char *fmt, ...) const;
 
-  double xscalar_value (const char *fmt, ...) const;
+  OCTINTERP_API FloatMatrix xfloat_matrix_value (const char *fmt, ...) const;
 
-  float xfloat_scalar_value (const char *fmt, ...) const;
+  OCTINTERP_API NDArray xarray_value (const char *fmt, ...) const;
 
-  Matrix xmatrix_value (const char *fmt, ...) const;
+  OCTINTERP_API FloatNDArray xfloat_array_value (const char *fmt, ...) const;
 
-  FloatMatrix xfloat_matrix_value (const char *fmt, ...) const;
+  OCTINTERP_API Complex xcomplex_value (const char *fmt, ...) const;
 
-  NDArray xarray_value (const char *fmt, ...) const;
+  OCTINTERP_API FloatComplex xfloat_complex_value (const char *fmt, ...) const;
 
-  FloatNDArray xfloat_array_value (const char *fmt, ...) const;
-
-  Complex xcomplex_value (const char *fmt, ...) const;
+  OCTINTERP_API ComplexMatrix
+  xcomplex_matrix_value (const char *fmt, ...) const;
 
-  FloatComplex xfloat_complex_value (const char *fmt, ...) const;
+  OCTINTERP_API FloatComplexMatrix
+  xfloat_complex_matrix_value (const char *fmt, ...) const;
 
-  ComplexMatrix xcomplex_matrix_value (const char *fmt, ...) const;
+  OCTINTERP_API ComplexNDArray
+  xcomplex_array_value (const char *fmt, ...) const;
 
-  FloatComplexMatrix xfloat_complex_matrix_value (const char *fmt, ...) const;
+  OCTINTERP_API FloatComplexNDArray
+  xfloat_complex_array_value (const char *fmt, ...) const;
 
-  ComplexNDArray xcomplex_array_value (const char *fmt, ...) const;
+  OCTINTERP_API bool xbool_value (const char *fmt, ...) const;
 
-  FloatComplexNDArray xfloat_complex_array_value (const char *fmt, ...) const;
+  OCTINTERP_API boolMatrix xbool_matrix_value (const char *fmt, ...) const;
 
-  bool xbool_value (const char *fmt, ...) const;
+  OCTINTERP_API boolNDArray xbool_array_value (const char *fmt, ...) const;
 
-  boolMatrix xbool_matrix_value (const char *fmt, ...) const;
+  OCTINTERP_API charMatrix xchar_matrix_value (const char *fmt, ...) const;
 
-  boolNDArray xbool_array_value (const char *fmt, ...) const;
+  OCTINTERP_API charNDArray xchar_array_value (const char *fmt, ...) const;
 
-  charMatrix xchar_matrix_value (const char *fmt, ...) const;
+  OCTINTERP_API SparseMatrix xsparse_matrix_value (const char *fmt, ...) const;
 
-  charNDArray xchar_array_value (const char *fmt, ...) const;
+  OCTINTERP_API SparseComplexMatrix
+  xsparse_complex_matrix_value (const char *fmt, ...) const;
 
-  SparseMatrix xsparse_matrix_value (const char *fmt, ...) const;
+  OCTINTERP_API SparseBoolMatrix
+  xsparse_bool_matrix_value (const char *fmt, ...) const;
 
-  SparseComplexMatrix xsparse_complex_matrix_value (const char *fmt, ...) const;
+  OCTINTERP_API DiagMatrix xdiag_matrix_value (const char *fmt, ...) const;
 
-  SparseBoolMatrix xsparse_bool_matrix_value (const char *fmt, ...) const;
+  OCTINTERP_API FloatDiagMatrix
+  xfloat_diag_matrix_value (const char *fmt, ...) const;
 
-  DiagMatrix xdiag_matrix_value (const char *fmt, ...) const;
+  OCTINTERP_API ComplexDiagMatrix
+  xcomplex_diag_matrix_value (const char *fmt, ...) const;
 
-  FloatDiagMatrix xfloat_diag_matrix_value (const char *fmt, ...) const;
-
-  ComplexDiagMatrix xcomplex_diag_matrix_value (const char *fmt, ...) const;
+  OCTINTERP_API FloatComplexDiagMatrix
+  xfloat_complex_diag_matrix_value (const char *fmt, ...) const;
 
-  FloatComplexDiagMatrix xfloat_complex_diag_matrix_value (const char *fmt, ...) const;
+  OCTINTERP_API PermMatrix xperm_matrix_value (const char *fmt, ...) const;
 
-  PermMatrix xperm_matrix_value (const char *fmt, ...) const;
+  OCTINTERP_API octave_int8 xint8_scalar_value (const char *fmt, ...) const;
 
-  octave_int8 xint8_scalar_value (const char *fmt, ...) const;
+  OCTINTERP_API octave_int16 xint16_scalar_value (const char *fmt, ...) const;
 
-  octave_int16 xint16_scalar_value (const char *fmt, ...) const;
+  OCTINTERP_API octave_int32 xint32_scalar_value (const char *fmt, ...) const;
+
+  OCTINTERP_API octave_int64 xint64_scalar_value (const char *fmt, ...) const;
 
-  octave_int32 xint32_scalar_value (const char *fmt, ...) const;
+  OCTINTERP_API octave_uint8 xuint8_scalar_value (const char *fmt, ...) const;
 
-  octave_int64 xint64_scalar_value (const char *fmt, ...) const;
+  OCTINTERP_API octave_uint16 xuint16_scalar_value (const char *fmt, ...) const;
 
-  octave_uint8 xuint8_scalar_value (const char *fmt, ...) const;
+  OCTINTERP_API octave_uint32 xuint32_scalar_value (const char *fmt, ...) const;
 
-  octave_uint16 xuint16_scalar_value (const char *fmt, ...) const;
+  OCTINTERP_API octave_uint64 xuint64_scalar_value (const char *fmt, ...) const;
 
-  octave_uint32 xuint32_scalar_value (const char *fmt, ...) const;
+  OCTINTERP_API int8NDArray xint8_array_value (const char *fmt, ...) const;
 
-  octave_uint64 xuint64_scalar_value (const char *fmt, ...) const;
+  OCTINTERP_API int16NDArray xint16_array_value (const char *fmt, ...) const;
 
-  int8NDArray xint8_array_value (const char *fmt, ...) const;
+  OCTINTERP_API int32NDArray xint32_array_value (const char *fmt, ...) const;
 
-  int16NDArray xint16_array_value (const char *fmt, ...) const;
+  OCTINTERP_API int64NDArray xint64_array_value (const char *fmt, ...) const;
 
-  int32NDArray xint32_array_value (const char *fmt, ...) const;
+  OCTINTERP_API uint8NDArray xuint8_array_value (const char *fmt, ...) const;
+
+  OCTINTERP_API uint16NDArray xuint16_array_value (const char *fmt, ...) const;
 
-  int64NDArray xint64_array_value (const char *fmt, ...) const;
+  OCTINTERP_API uint32NDArray xuint32_array_value (const char *fmt, ...) const;
 
-  uint8NDArray xuint8_array_value (const char *fmt, ...) const;
+  OCTINTERP_API uint64NDArray xuint64_array_value (const char *fmt, ...) const;
 
-  uint16NDArray xuint16_array_value (const char *fmt, ...) const;
+  OCTINTERP_API std::string xstring_value (const char *fmt, ...) const;
 
-  uint32NDArray xuint32_array_value (const char *fmt, ...) const;
+  OCTINTERP_API string_vector xstring_vector_value (const char *fmt, ...) const;
 
-  uint64NDArray xuint64_array_value (const char *fmt, ...) const;
+  OCTINTERP_API Cell xcell_value (const char *fmt, ...) const;
 
-  std::string xstring_value (const char *fmt, ...) const;
-
-  string_vector xstring_vector_value (const char *fmt, ...) const;
+  OCTINTERP_API Array<std::string> xcellstr_value (const char *fmt, ...) const;
 
-  Cell xcell_value (const char *fmt, ...) const;
+  OCTINTERP_API octave::range<float>
+  xfloat_range_value (const char *fmt, ...) const;
 
-  Array<std::string> xcellstr_value (const char *fmt, ...) const;
+  OCTINTERP_API octave::range<double>
+  xrange_value (const char *fmt, ...) const;
 
-  octave::range<float> xfloat_range_value (const char *fmt, ...) const;
+  OCTINTERP_API octave::range<octave_int8>
+  xint8_range_value (const char *fmt, ...) const;
 
-  octave::range<double> xrange_value (const char *fmt, ...) const;
+  OCTINTERP_API octave::range<octave_int16>
+  xint16_range_value (const char *fmt, ...) const;
 
-  octave::range<octave_int8> xint8_range_value (const char *fmt, ...) const;
+  OCTINTERP_API octave::range<octave_int32>
+  xint32_range_value (const char *fmt, ...) const;
 
-  octave::range<octave_int16> xint16_range_value (const char *fmt, ...) const;
-
-  octave::range<octave_int32> xint32_range_value (const char *fmt, ...) const;
+  OCTINTERP_API octave::range<octave_int64>
+  xint64_range_value (const char *fmt, ...) const;
 
-  octave::range<octave_int64> xint64_range_value (const char *fmt, ...) const;
-
-  octave::range<octave_uint8> xuint8_range_value (const char *fmt, ...) const;
+  OCTINTERP_API octave::range<octave_uint8>
+  xuint8_range_value (const char *fmt, ...) const;
 
-  octave::range<octave_uint16> xuint16_range_value (const char *fmt, ...) const;
+  OCTINTERP_API octave::range<octave_uint16>
+  xuint16_range_value (const char *fmt, ...) const;
 
-  octave::range<octave_uint32> xuint32_range_value (const char *fmt, ...) const;
+  OCTINTERP_API octave::range<octave_uint32>
+  xuint32_range_value (const char *fmt, ...) const;
 
-  octave::range<octave_uint64> xuint64_range_value (const char *fmt, ...) const;
+  OCTINTERP_API octave::range<octave_uint64>
+  xuint64_range_value (const char *fmt, ...) const;
 
-  octave_map xmap_value (const char *fmt, ...) const;
+  OCTINTERP_API octave_map xmap_value (const char *fmt, ...) const;
 
-  octave_scalar_map xscalar_map_value (const char *fmt, ...) const;
+  OCTINTERP_API octave_scalar_map
+  xscalar_map_value (const char *fmt, ...) const;
 
-  ColumnVector xcolumn_vector_value (const char *fmt, ...) const;
+  OCTINTERP_API ColumnVector xcolumn_vector_value (const char *fmt, ...) const;
 
-  ComplexColumnVector
+  OCTINTERP_API ComplexColumnVector
   xcomplex_column_vector_value (const char *fmt, ...) const;
 
-  RowVector xrow_vector_value (const char *fmt, ...) const;
+  OCTINTERP_API RowVector xrow_vector_value (const char *fmt, ...) const;
 
-  ComplexRowVector xcomplex_row_vector_value (const char *fmt, ...) const;
+  OCTINTERP_API ComplexRowVector
+  xcomplex_row_vector_value (const char *fmt, ...) const;
 
-  FloatColumnVector xfloat_column_vector_value (const char *fmt, ...) const;
+  OCTINTERP_API FloatColumnVector
+  xfloat_column_vector_value (const char *fmt, ...) const;
 
-  FloatComplexColumnVector
+  OCTINTERP_API FloatComplexColumnVector
   xfloat_complex_column_vector_value (const char *fmt, ...) const;
 
-  FloatRowVector xfloat_row_vector_value (const char *fmt, ...) const;
+  OCTINTERP_API FloatRowVector
+  xfloat_row_vector_value (const char *fmt, ...) const;
 
-  FloatComplexRowVector
+  OCTINTERP_API FloatComplexRowVector
   xfloat_complex_row_vector_value (const char *fmt, ...) const;
 
-  Array<int> xint_vector_value (const char *fmt, ...) const;
+  OCTINTERP_API Array<int> xint_vector_value (const char *fmt, ...) const;
 
-  Array<octave_idx_type>
+  OCTINTERP_API Array<octave_idx_type>
   xoctave_idx_type_vector_value (const char *fmt, ...) const;
 
-  Array<double> xvector_value (const char *fmt, ...) const;
+  OCTINTERP_API Array<double> xvector_value (const char *fmt, ...) const;
 
-  Array<Complex> xcomplex_vector_value (const char *fmt, ...) const;
+  OCTINTERP_API Array<Complex>
+  xcomplex_vector_value (const char *fmt, ...) const;
 
-  Array<float> xfloat_vector_value (const char *fmt, ...) const;
+  OCTINTERP_API Array<float> xfloat_vector_value (const char *fmt, ...) const;
 
-  Array<FloatComplex> xfloat_complex_vector_value (const char *fmt, ...) const;
+  OCTINTERP_API Array<FloatComplex>
+  xfloat_complex_vector_value (const char *fmt, ...) const;
+
+  OCTINTERP_API octave_function * xfunction_value (const char *fmt, ...) const;
 
-  octave_function * xfunction_value (const char *fmt, ...) const;
-  octave_user_function * xuser_function_value (const char *fmt, ...) const;
-  octave_user_script * xuser_script_value (const char *fmt, ...) const;
-  octave_user_code * xuser_code_value (const char *fmt, ...) const;
-  octave_fcn_handle * xfcn_handle_value (const char *fmt, ...) const;
+  OCTINTERP_API octave_user_function *
+  xuser_function_value (const char *fmt, ...) const;
+
+  OCTINTERP_API octave_user_script *
+  xuser_script_value (const char *fmt, ...) const;
 
-  octave_value_list xlist_value (const char *fmt, ...) const;
+  OCTINTERP_API octave_user_code *
+  xuser_code_value (const char *fmt, ...) const;
+
+  OCTINTERP_API octave_fcn_handle *
+  xfcn_handle_value (const char *fmt, ...) const;
+
+  OCTINTERP_API octave_value_list xlist_value (const char *fmt, ...) const;
 
   // Possibly economize a lazy-indexed value.
 
@@ -1262,12 +1330,12 @@
   // storing it to a "permanent" location, like a named variable, a cell or a
   // struct component, or a return value of a function.
 
-  octave_value storable_value (void) const;
+  OCTINTERP_API octave_value storable_value (void) const;
 
   // Ditto, but in place, i.e., equivalent to *this = this->storable_value (),
   // but possibly more efficient.
 
-  void make_storable_value (void);
+  OCTINTERP_API void make_storable_value (void);
 
   // FIXME: These should probably be private.
   // Conversions.  If a user of this class wants a certain kind of constant,
@@ -1301,7 +1369,7 @@
 
   void short_disp (std::ostream& os) const { rep->short_disp (os); }
 
-  float_display_format get_edit_display_format (void) const;
+  OCTINTERP_API float_display_format get_edit_display_format (void) const;
 
   std::string edit_display (const float_display_format& fmt,
                             octave_idx_type i, octave_idx_type j) const
@@ -1319,7 +1387,7 @@
   // non-member functions for unary and binary operations declared
   // below, outside of the octave_value class declaration.
 
-  octave_value& non_const_unary_op (unary_op op);
+  OCTINTERP_API octave_value& non_const_unary_op (unary_op op);
 
   OCTAVE_DEPRECATED (7, "use 'octave_value::non_const_unary_op' instead")
   octave_value& do_non_const_unary_op (unary_op op)
@@ -1327,8 +1395,9 @@
     return non_const_unary_op (op);
   }
 
-  octave_value& non_const_unary_op (unary_op op, const std::string& type,
-                                    const std::list<octave_value_list>& idx);
+  OCTINTERP_API octave_value&
+  non_const_unary_op (unary_op op, const std::string& type,
+                      const std::list<octave_value_list>& idx);
 
   OCTAVE_DEPRECATED (7, "use 'octave_value::non_const_unary_op' instead")
   octave_value& do_non_const_unary_op (unary_op op, const std::string& type,
@@ -1341,8 +1410,8 @@
 
   bool is_copy_of (const octave_value& val) const { return rep == val.rep; }
 
-  void print_info (std::ostream& os,
-                   const std::string& prefix = "") const;
+  OCTINTERP_API void
+  print_info (std::ostream& os, const std::string& prefix = "") const;
 
   bool save_ascii (std::ostream& os) { return rep->save_ascii (os); }
 
@@ -1362,16 +1431,18 @@
   bool load_hdf5 (octave_hdf5_id loc_id, const char *name)
   { return rep->load_hdf5 (loc_id, name); }
 
-  int write (octave::stream& os, int block_size,
-             oct_data_conv::data_type output_type, int skip,
-             octave::mach_info::float_format flt_fmt) const;
+  OCTINTERP_API int
+  write (octave::stream& os, int block_size,
+         oct_data_conv::data_type output_type, int skip,
+         octave::mach_info::float_format flt_fmt) const;
 
   octave_base_value * internal_rep (void) const { return rep; }
 
   // Unsafe.  These functions exist to support the MEX interface.
   // You should not use them anywhere else.
-  void * mex_get_data (mxClassID class_id = mxUNKNOWN_CLASS,
-                       mxComplexity complexity = mxREAL) const;
+  OCTINTERP_API void *
+  mex_get_data (mxClassID class_id = mxUNKNOWN_CLASS,
+                mxComplexity complexity = mxREAL) const;
 
   octave_idx_type * mex_get_ir (void) const { return rep->mex_get_ir (); }
 
@@ -1519,15 +1590,15 @@
 
 private:
 
-  static octave_base_value *nil_rep (void);
+  static OCTINTERP_API octave_base_value *nil_rep (void);
 
-  assign_op unary_op_to_assign_op (unary_op op);
+  OCTINTERP_API assign_op unary_op_to_assign_op (unary_op op);
 
-  binary_op op_eq_to_binary_op (assign_op op);
+  OCTINTERP_API binary_op op_eq_to_binary_op (assign_op op);
 
   // This declaration protects against constructing octave_value from
   // const octave_base_value* which actually silently calls octave_value (bool).
-  octave_value (const octave_base_value *);
+  OCTINTERP_API octave_value (const octave_base_value *);
 
 };