[CM] Errors building latest S7 (today's) on VS2019, Windows 10
Iain Duncan
iainduncanlists at gmail.com
Sat May 9 14:07:33 PDT 2020
Confirming that fixed it. At least on my setup.
Thanks!
iain
On Sat, May 9, 2020 at 2:02 PM <bil at ccrma.stanford.edu> wrote:
> > compiling S7 throws errors for lines 11121 to 11125:
> > Error C2491 'asinh': definition of dllimport function not
> allowed
>
> I misunderstood something Rick sent me -- in s7.c at line 11119
> enclose the asinh etc in (_MSC_VER < 1700)
>
> #if (_MSC_VER < 1700)
> /* in MS C, we need to provide inverse hyperbolic trig funcs and cbrt
> */
> static double asinh(double x) {return(log(x + sqrt(1.0 + x * x)));}
> static double acosh(double x) {return(log(x + sqrt(x * x - 1.0)));}
> /* perhaps less prone to numerical troubles (untested): 2.0 *
> log(sqrt(0.5 * (x + 1.0)) + sqrt(0.5 * (x - 1.0))) */
> static double atanh(double x) {return(log((1.0 + x) / (1.0 - x)) /
> 2.0);}
> static double cbrt(double x) {if (x >= 0.0) return(pow(x, 1.0 / 3.0));
> return(-pow(-x, 1.0 / 3.0));}
> #endif
>
> I'm guessing about the 1700.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cm-mail.stanford.edu/mailman/private/cmdist/attachments/20200509/eb591659/attachment.html>
More information about the Cmdist
mailing list