From: Stogner, R. H <roy...@ic...> - 2019-12-11 13:52:11
|
On Wed, 11 Dec 2019, Povolotskyi, Mykhailo wrote: > I have encountered a problem with M_PI symbol: M_PI is defined by any Unix98-standard math.h https://pubs.opengroup.org/onlinepubs/009695399/basedefs/math.h.html But if you're not using a Unix98 math.h you might have a problem? There's a workaround for MSVC which nanoflann.hpp already uses but which is kind of fragile, for instance: https://stackoverflow.com/questions/6563810/m-pi-works-with-math-h-but-not-with-cmath-in-visual-studio And if you're using yet-another non-Unix98 math.h still then you might need a different workaround or there might be no workaround other than defining M_PI (and any other missing symbols, of which there hopefully aren't too too many) yourself. --- Roy |