Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
April 27, 2011 Which import lib holds lrintf()? | ||||
---|---|---|---|---|
| ||||
import std.c.math : lrintf; void main() { lrintf(4.0); } Error 42: Symbol Undefined _lrintf --- errorlevel 1 |
April 27, 2011 Re: Which import lib holds lrintf()? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrej Mitrovic | Andrej Mitrovic Wrote:
> import std.c.math : lrintf;
>
> void main()
> {
> lrintf(4.0);
> }
>
> Error 42: Symbol Undefined _lrintf
> --- errorlevel 1
Just a guess, libm?
dmd testfile.d -L-lm
m is the C math library for linux right? Windows I don't know.
|
April 27, 2011 Re: Which import lib holds lrintf()? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jesse Phillips | I have a hunch that this function is only available on Linux. If that's so it should maybe be put in a version(linux) statement. But I just found lrint is in std.math as well so I can actually use that. |
April 28, 2011 Re: Which import lib holds lrintf()? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrej Mitrovic | Andrej Mitrovic wrote:
> I have a hunch that this function is only available on Linux. If
> that's so it should maybe be put in a version(linux) statement.
>
> But I just found lrint is in std.math as well so I can actually use that.
There should be no reason to use anything from c.math.
|
Copyright © 1999-2021 by the D Language Foundation