digitalmars.D.learn - Which import lib holds lrintf()?
- Andrej Mitrovic (7/7) Apr 26 2011 import std.c.math : lrintf;
- Jesse Phillips (4/13) Apr 27 2011 Just a guess, libm?
- Andrej Mitrovic (3/3) Apr 27 2011 I have a hunch that this function is only available on Linux. If
- Don (2/6) Apr 28 2011 There should be no reason to use anything from c.math.
- Andrej Mitrovic (1/1) Apr 28 2011 Okay. Some C code used lrintf() so I was trying to find it to port it to...
import std.c.math : lrintf; void main() { lrintf(4.0); } Error 42: Symbol Undefined _lrintf --- errorlevel 1
Apr 26 2011
Andrej Mitrovic Wrote:import std.c.math : lrintf; void main() { lrintf(4.0); } Error 42: Symbol Undefined _lrintf --- errorlevel 1Just a guess, libm? dmd testfile.d -L-lm m is the C math library for linux right? Windows I don't know.
Apr 27 2011
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.
Apr 27 2011
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.
Apr 28 2011
Okay. Some C code used lrintf() so I was trying to find it to port it to D.
Apr 28 2011