pcarbo / lbfgsb-matlab

A MATLAB interface for L-BFGS-B
GNU General Public License v3.0
51 stars 25 forks source link

Errors while compiling against Octave 3.8.2 #6

Open cgreenberg opened 9 years ago

cgreenberg commented 9 years ago

I'm using Octave installed from home-brew in Mac OS 10.10.5 Yosemite. These are the errors I get when I call make oct:

g++ -O3 -fPIC -pthread -Wall -Werror -ansi -ffast-math -fomit-frame-pointer -I/usr/local/Cellar/octave/3.8.2_1/include/octave-3.8.2/octave/ -I/extern/include -o arrayofmatrices.o -c arrayofmatrices.cpp
In file included from arrayofmatrices.cpp:4:
In file included from /usr/local/Cellar/octave/3.8.2_1/include/octave-3.8.2/octave/matrix.h:30:
In file included from /usr/local/Cellar/octave/3.8.2_1/include/octave-3.8.2/octave/mx-base.h:28:
/usr/local/Cellar/octave/3.8.2_1/include/octave-3.8.2/octave/MatrixType.h:36:1: error: variable has incomplete type 'class OCTAVE_API'
MatrixType
^
/usr/local/Cellar/octave/3.8.2_1/include/octave-3.8.2/octave/MatrixType.h:35:1: note: forward declaration of 'OCTAVE_API'
OCTAVE_API
^
/usr/local/Cellar/octave/3.8.2_1/include/octave-3.8.2/octave/MatrixType.h:36:11: error: expected ';' after top level declarator
MatrixType
          ^
          ;
In file included from arrayofmatrices.cpp:4:
In file included from /usr/local/Cellar/octave/3.8.2_1/include/octave-3.8.2/octave/matrix.h:30:
In file included from /usr/local/Cellar/octave/3.8.2_1/include/octave-3.8.2/octave/mx-base.h:32:
In file included from /usr/local/Cellar/octave/3.8.2_1/include/octave-3.8.2/octave/boolMatrix.h:27:
In file included from /usr/local/Cellar/octave/3.8.2_1/include/octave-3.8.2/octave/Array.h:35:
In file included from /usr/local/Cellar/octave/3.8.2_1/include/octave-3.8.2/octave/dim-vector.h:33:
/usr/local/Cellar/octave/3.8.2_1/include/octave-3.8.2/octave/lo-error.h:30:52: error: expected function body after function declarator
extern void liboctave_fatal (const char *fmt, ...) GCC_ATTR_NORETURN;
                                                   ^
/usr/local/Cellar/octave/3.8.2_1/include/octave-3.8.2/octave/lo-error.h:32:76: error: expected function body after function declarator
extern void liboctave_fatal_with_id (const char *id, const char *fmt, ...) GCC_ATTR_NORETURN;
                                                                           ^
/usr/local/Cellar/octave/3.8.2_1/include/octave-3.8.2/octave/lo-error.h:48:1: error: unknown type name 'CRUFT_API'
CRUFT_API extern liboctave_error_handler current_liboctave_error_handler;
^
/usr/local/Cellar/octave/3.8.2_1/include/octave-3.8.2/octave/lo-error.h:48:11: error: expected unqualified-id
CRUFT_API extern liboctave_error_handler current_liboctave_error_handler;
          ^
/usr/local/Cellar/octave/3.8.2_1/include/octave-3.8.2/octave/lo-error.h:50:1: error: unknown type name 'CRUFT_API'
CRUFT_API extern liboctave_error_with_id_handler current_liboctave_error_with_id_handler;
^
/usr/local/Cellar/octave/3.8.2_1/include/octave-3.8.2/octave/lo-error.h:50:11: error: expected unqualified-id
CRUFT_API extern liboctave_error_with_id_handler current_liboctave_error_with_id_handler;
          ^
/usr/local/Cellar/octave/3.8.2_1/include/octave-3.8.2/octave/lo-error.h:52:1: error: unknown type name 'CRUFT_API'
CRUFT_API extern liboctave_warning_handler current_liboctave_warning_handler;
^
/usr/local/Cellar/octave/3.8.2_1/include/octave-3.8.2/octave/lo-error.h:52:11: error: expected unqualified-id
CRUFT_API extern liboctave_warning_handler current_liboctave_warning_handler;
          ^
/usr/local/Cellar/octave/3.8.2_1/include/octave-3.8.2/octave/lo-error.h:54:1: error: unknown type name 'CRUFT_API'
CRUFT_API extern liboctave_warning_with_id_handler current_liboctave_warning_with_id_handler;
^
/usr/local/Cellar/octave/3.8.2_1/include/octave-3.8.2/octave/lo-error.h:54:11: error: expected unqualified-id
CRUFT_API extern liboctave_warning_with_id_handler current_liboctave_warning_with_id_handler;
          ^
/usr/local/Cellar/octave/3.8.2_1/include/octave-3.8.2/octave/lo-error.h:56:1: error: unknown type name 'CRUFT_API'
CRUFT_API extern void set_liboctave_error_handler (liboctave_error_handler f);
^
/usr/local/Cellar/octave/3.8.2_1/include/octave-3.8.2/octave/lo-error.h:56:11: error: expected unqualified-id
CRUFT_API extern void set_liboctave_error_handler (liboctave_error_handler f);
          ^
/usr/local/Cellar/octave/3.8.2_1/include/octave-3.8.2/octave/lo-error.h:58:1: error: unknown type name 'CRUFT_API'
CRUFT_API extern void set_liboctave_error_with_id_handler (liboctave_error_with_id_handler f);
^
/usr/local/Cellar/octave/3.8.2_1/include/octave-3.8.2/octave/lo-error.h:58:11: error: expected unqualified-id
CRUFT_API extern void set_liboctave_error_with_id_handler (liboctave_error_with_id_handler f);
          ^
/usr/local/Cellar/octave/3.8.2_1/include/octave-3.8.2/octave/lo-error.h:60:1: error: unknown type name 'CRUFT_API'
CRUFT_API extern void set_liboctave_warning_handler (liboctave_warning_handler f);
^
/usr/local/Cellar/octave/3.8.2_1/include/octave-3.8.2/octave/lo-error.h:60:11: error: expected unqualified-id
CRUFT_API extern void set_liboctave_warning_handler (liboctave_warning_handler f);
          ^
/usr/local/Cellar/octave/3.8.2_1/include/octave-3.8.2/octave/lo-error.h:62:1: error: unknown type name 'CRUFT_API'
CRUFT_API extern void set_liboctave_warning_with_id_handler (liboctave_warning_with_id_handler f);
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [arrayofmatrices.o] Error 1
pcarbo commented 9 years ago

Thanks for posting this. Jose Vallet contributed support for Octave---I don't have any experience using Octave. Maybe you can try contacting him? Please let me know if you solve the problem. -Peter