GNOME Bugzilla – Bug 756381
math.h include broken when compiling with VS2015
Last modified: 2015-10-12 09:17:19 UTC
gdk-pixbuf ships with a build/win32/math-compat/math.h file that tries to include the CRT's math.h and then add a round() implementation to it, since the math.h that ships with VS 2013 and earlier lacks this function. I assume the file is named the same as the standard header so that the other files which include it do not need to be changed. Since this header also needs to include the CRT's math.h while itself being called math.h, it does this by including `<../include/math.h>`. This happens to work with the CRTs shipped with earlier versions of VS since their math.h was in a directory called "include", but in VS 2015 the header is in a directory named "ucrt". Thus the file cannot be included and fails compilation. The VS 2015 math.h contains round() so this entier header is unnecessary with that SDK.
Hi Arnav, Thanks for reporting this... this should be fixed in gdk-pixbuf's master and gdk-pixbuf-2-32 branches. With blessings, thank you!