On Mon, Feb 22, 2010 at 7:30 PM, Michael Creel <[email protected]> wrote:

> On Mon, Feb 22, 2010 at 7:25 PM, Benjamin Lindner <[email protected]>
> wrote:
> > 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&#174; 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
> >
>
> Hi Benjamin,
> Could you check that in, please? Otherwise, I'll do it tomorrow. Maybe
> I can move the objective function bullet-proofing completely out of
> the .cc file, which would make this unnecessary.
> Cheers, Michael
>


I have checked this change into svn. I haven't tested this, other than to
verify that it still compiles with gcc.

Cheers, M
------------------------------------------------------------------------------
Download Intel&#174; 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

Reply via email to