Bug 12415 – lrintf doesn't seem to exist on Windows

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-03-19T14:02:00Z
Last change time
2017-07-21T10:23:31Z
Assigned to
nobody
Creator
andrej.mitrovich

Comments

Comment #0 by andrej.mitrovich — 2014-03-19T14:02:33Z
----- import core.stdc.math; void main() { lrintf(0.5); } ----- > Error 42: Symbol Undefined _lrintf Same also with -m64 and using the VC linker. I know std.math has an lrint function which we can use, but it's strange the above would fail to link. If 'lrintf' is a Posix-only function then its prototypes should not be visible on Windows.
Comment #1 by dlang-bugzilla — 2017-07-21T10:23:31Z
As per the comment in core.stdc.math: else version( CRuntime_Microsoft ) // fully supported since MSVCRT 12 (VS 2013) only So, you may need to update your Visual Studio edition. The functions are correctly not defined for CRuntime_DigitalMars.