Changing the data structure to read:

static const struct {
        char * name;
        double (*fn)(double);
} __fg_snd_fn[] = {

caused everything to work properly.  I know that this is not the proper C+
+ solution, but it worked for me.

Jonathan Polley

On Monday, March 11, 2002, at 08:21 PM, Andy Ross wrote:

> Jonathan Polley wrote:
> > I just updated my Windows machine with the latest source and did a 
> build.
> > Under MSVC, it does not like:
> >
> > static const struct {
> >     string name;
> >     double (*fn)(double);
> > } __fg_snd_fn[] = {
> > //  {"lin", _fg_lin},
> >     {"inv", _fg_inv},
> >     {"abs", _fg_abs},
> >     {"sqrt", _fg_sqrt},
> >     {"log", _fg_log10},
> >     {"ln", _fg_log},
> > //  {"sqr", _fg_sqr},
> > //  {"pow3", _fg_pow3},
> >     {"", NULL}
> > };
>
> Hrm... this was the same construct that was giving Erik trouble with
> the MIPS compiler.  Apparently VC++ doesn't like it either.
>
> You could try making the type explicit instead:
>
>   struct DummyTypeName {
>       string name;
>       double (*fn)(double);
>   };
>   DummyTypeName __fg_snd_fn[] = { ... }
>
> ...and see if that fixes it.  Or if you're not stuck on the MS
> compiler, you could use GCC under cygwin, which handles it just
> fine.
>
> <duck>
>
> Andy
>
> -- Andrew J. Ross                NextBus Information Systems
> Senior Software Engineer      Emeryville, CA
> [EMAIL PROTECTED]              http://www.nextbus.com
> "Men go crazy in conflagrations.  They only get better one by one."
>  - Sting (misquoted)
>
>
> _______________________________________________
> Flightgear-devel mailing list
> [EMAIL PROTECTED]
> http://mail.flightgear.org/mailman/listinfo/flightgear-devel


_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to