mmp / pbrt-v3

Source code for pbrt, the renderer described in the third edition of "Physically Based Rendering: From Theory To Implementation", by Matt Pharr, Wenzel Jakob, and Greg Humphreys.
http://pbrt.org
BSD 2-Clause "Simplified" License
4.87k stars 1.18k forks source link

WIN32 is not defined on x86 platform, Visual Studio 2017 #191

Closed delguoqing closed 6 years ago

delguoqing commented 6 years ago

x64 platform is ok.

mmp commented 6 years ago

Does this caused problems with building pbrt? I see a check for WIN32 in src/core/imageio.cpp. Are there other things that don't compile? Is _WIN32 defined?

delguoqing commented 6 years ago

yes. pbrt can't compile. The error message is: Can't detect machine endian-ness at compile-time.

_WIN32 is defined but WIN32 is not.

mmp commented 6 years ago

I dug into this now, and 32-bit builds with VS2017 works for me. However, I added a check for _WIN32 there in 81fd5fd in any case.