help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why do I get ov-base.h:165:3: error: expected constructor, destructor ?


From: ndarkness
Subject: Why do I get ov-base.h:165:3: error: expected constructor, destructor ?
Date: Tue, 6 Dec 2016 06:43:00 -0800 (PST)

Hello 

I am compiling a class  (in octave 4.0.3) that should allow me to work with
some device through visa and I run into this error on /ov-base.h/, does
anyone know what I am missing?

/>> system('sh')
sh-3.1$ make
mkoctfile -c -DBUILD_GPIB gpib_class.cc
In file included from
C:\Octave\Octave-4.0.3\include\octave-4.0.3\octave\../octave/ov.h:55:0,
                 from
C:\Octave\Octave-4.0.3\include\octave-4.0.3\octave\../octave/oct-obj.h:33,
                 from
C:\Octave\Octave-4.0.3\include\octave-4.0.3\octave\../octave/ov-fcn.h:31,
                 from
C:\Octave\Octave-4.0.3\include\octave-4.0.3\octave\../octave/ov-builtin.h:28,
                 from
C:\Octave\Octave-4.0.3\include\octave-4.0.3\octave\../octave/defun-int.h:28,
                 from
C:\Octave\Octave-4.0.3\include\octave-4.0.3\octave\../octave/defun-dld.h:30,
                 from
C:\Octave\Octave-4.0.3\include\octave-4.0.3\octave\../octave/oct.h:36,
                 from gpib_class.cc:22:
C:\Octave\Octave-4.0.3\include\octave-4.0.3\octave\../octave/ov-base.h:165:3:
error: expected constructor, destructor, or type conversion before 'int'
   int t::t_id (-1); \
   ^
gpib_class.cc:49:1: note: in expansion of macro
'DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA'
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_gpib, "octave_gpib",
"octave_gpib")
 ^
make: *** [gpib_class.o] Error 1
sh-3.1$/

If I go to /ov-base.h:165:3/ I see this
/
#define DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA(t, n, c) \
  int t::t_id (-1); \
  const std::string t::t_name (n); \
  const std::string t::c_name (c); \
  void t::register_type (void) \
    { \
      static t exemplar; \
      octave_value v (&exemplar, true); \
      t_id = octave_value_typeinfo::register_type (t::t_name, t::c_name, v);
\
    }/

Thanks in advance

PS: my gpib_chass.h defines the Octave allocators and Function as 

/  #if defined (DEFINE_OCTAVE_ALLOCATOR)
    DECLARE_OCTAVE_ALLOCATOR
  #endif
  #if defined (DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA)
    DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
  #endif
};/



--
View this message in context: 
http://octave.1599824.n4.nabble.com/Why-do-I-get-ov-base-h-165-3-error-expected-constructor-destructor-tp4680908.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]