digitalmars.D.learn - Which import lib holds lrintf()?
- Andrej Mitrovic <none none.none> Apr 26 2011
- Jesse Phillips <jessekphillips+D gmail.com> Apr 27 2011
- Don <nospam nospam.com> Apr 28 2011
- Andrej Mitrovic <andrej.mitrovich gmail.com> Apr 28 2011
- Andrej Mitrovic <andrej.mitrovich gmail.com> Apr 27 2011
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 1
Just 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
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
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









Don <nospam nospam.com> 