Benjamin Lindner wrote:
> Hello,
>
> trying to install the optim-1.0.10 package with octave 3.2.4 on mingw32
> fails with the error message
>
> __bfgsmin.cc:242: error: 'isnan' was not declared in this scope
>
> I need to also #include <math.h> like
>
> Index: optim/src/__bfgsmin.cc
> ===================================================================
> --- optim/src/__bfgsmin.cc (revision 6775)
> +++ optim/src/__bfgsmin.cc (working copy)
> @@ -27,6 +27,7 @@
> #include <octave/parse.h>
> #include <octave/Cell.h>
> #include <float.h>
> +#include <math.h>
> #include "error.h"
>
Too fast, this is not really a good solution.
It seems it requires the ugly hack
--- optim/src/__bfgsmin.cc (revision 6775)
+++ optim/src/__bfgsmin.cc (working copy)
@@ -29,6 +29,9 @@
#include <float.h>
#include "error.h"
+#ifdef __MINGW32__
+#define isnan _isnan
+#endif
int __bfgsmin_obj(double &obj, const std::string f, const
octave_value_list f_args, const ColumnVector theta, const int minarg)
{
benjamin
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Octave-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/octave-dev