Hello,

trying to install the optim-1.0.5 package on octave 3.2.0/mingw32 fails 
with the error

 > pkg install -verbose optim-1.0.5.tar.gz
__bfgsmin.cc: In function 'ColumnVector lbfgs_recursion(int, Matrix, 
Matrix, ColumnVector)':
__bfgsmin.cc:141: warning: unused variable 'k'
__bfgsmin.cc:142: warning: unused variable 'n'
__bfgsmin.cc:143: warning: unused variable 'i'
__bfgsmin.cc:143: warning: unused variable 'j'
__bfgsmin.cc: In function 'int __bisectionstep(double&, double&, 
std::string, octave_value_list, ColumnVector, ColumnVector, int, int)':
__bfgsmin.cc:161: warning: unused variable 'found_improvement'
__bfgsmin.cc: In function 'int __newtonstep(double&, double&, 
std::string, octave_value_list, ColumnVector, ColumnVector
, int, int)':
__bfgsmin.cc:242: error: 'lo_ieee_isnan' was not declared in this scope
mingw32-g++-4.3.0-dw2: __bfgsmin.o: No such file or directory
strip: '__bfgsmin.oct': No such file
make: *** [__bfgsmin.oct] Error 1

the function lo_ieee_isnan() is still in octave 3.2.0, declared in 
lo-ieee.h. Apparently this header is no longer included automatically.
So manually including it as in

diff -urN optim-1.0.5/src/__bfgsmin.cc optim-1.0.5b/src/__bfgsmin.cc
--- optim-1.0.5/src/__bfgsmin.cc        2009-05-08 15:17:19 +0200
+++ optim-1.0.5b/src/__bfgsmin.cc       2009-06-06 15:33:46 +0200
@@ -26,6 +26,7 @@
  #include <oct.h>
  #include <octave/parse.h>
  #include <octave/Cell.h>
+#include <octave/lo-ieee.h>
  #include <float.h>
  #include "error.h"


allows installation to complete.

benjamin

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Octave-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to