mmp/pbrt-v2 — pull request #7 by PhillipNordwal (2012-10-11 18:26:49+00:00)
Title: Visual Studio 2010 build fails. Fixed.

Visual studio 2010 fails when building.

This commit will fix the problem.

The problem is due to conflicting information in pbrt.h, that is guarded for inclusion only in windows (#if defined(PBRT_IS_WINDOWS) and in targa.h, which is guarded for inclusion only with visual studio (#ifdef _MSC_VER).

Changing the #defines in pbrt.h to typdefs solves the problem.

The error messages if you are interested are of the form:

1>p:\pbrt-v2.mmp\src\core\targa.h(24): warning C4114: same type qualifier used more than once
1>p:\pbrt-v2.mmp\src\core\targa.h(24): error C2632: 'char' followed by 'char' is illegal
1>p:\pbrt-v2.mmp\src\core\targa.h(24): warning C4091: 'typedef ' : ignored on left of 'unsigned char' when no variable is declared