<div dir="ltr">Yes, it should be _USE_MATH_DEFINES, my bad.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 4, 2016 at 12:26 AM, Jan Heckman <span dir="ltr"><<a href="mailto:jan.heckman@gmail.com" target="_blank">jan.heckman@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Tanuj,<div>It is <span style="color:rgb(111,0,138);font-family:Consolas">_USE_MATH_DEFINES, not </span><span style="font-size:12.8px">_USE_MATH_CONSTANTS in VC.</span><br style="color:rgb(111,0,138);font-family:Consolas"></div><div><span style="font-size:12.8px">My experience is this works AND is needed for math constants in VS2008, VS2013 and VS2015. VS2015 is the community version, the others are prof versions, but that should not make aucune difference, of course.</span></div><div><span style="font-size:12.8px">Jan</span></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Thu, Mar 3, 2016 at 6:55 PM, Tanuj Kumar <span dir="ltr"><<a href="mailto:kmrtnjscnc@gmail.com" target="_blank">kmrtnjscnc@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div><div><div><div><div><div>This is with regard to the bug listed on <a href="https://trac.osgeo.org/gdal/ticket/6388" target="_blank">https://trac.osgeo.org/gdal/ticket/6388</a><br></div><br>The fix is to remove the hard coded pi constants, but apparently, using M_PI from math.h as it is breaks compilation on Visual Studio <a href="http://stackoverflow.com/questions/26065359/m-pi-flagged-as-undeclared-identifier" target="_blank">http://stackoverflow.com/questions/26065359/m-pi-flagged-as-undeclared-identifier</a> (I haven't checked it yet myself; that would need me to switch to windows, and I'm on linux right now)<br><br></div>However, we could also declare #define _USE_MATH_CONSTANTS, and then use M_PI without declaring it(And not just M_PI, all the other math constants listed on <a href="https://msdn.microsoft.com/en-us/library/4hwaceh6.aspx" target="_blank">https://msdn.microsoft.com/en-us/library/4hwaceh6.aspx</a>).<br></div><br></div>Could someone please check whether math constants work in later versions of visual studio(Both with and without #define _USE_MATH_CONSTANTS)?<br><br></div>Thank you<span><font color="#888888"><br></font></span></div><span><font color="#888888">Tanuj<br></font></span></div>
<br></div></div>_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br></blockquote></div><br></div>
</blockquote></div><br></div>