Opened 15 years ago
Closed 15 years ago
Last modified 5 years ago
#3807 closed defect (fixed)
KYRA: does not compile in MSVC71
|Reported by:||SF/quietust||Owned by:||athrxx|
"engines/kyra/sound_towns.cpp" fails to compile due to M_PI not being defined. This appears to be due to sound_towns.cpp #defining _USE_MATH_DEFINES and then explicitly including <math.h> after all of the standard includes, even though "common/scummsys.h" (which is included by "common/system.h") already includes <math.h> on its own, causing further inclusions to have no effect.
Visual Studio 9.0 (2008) seems to have reorganized <math.h> by adding a separate include-once block around the math defines, so it compiles in that version without problems.
Ticket imported from: #2016965. Ticket imported from: bugs/3807.
Change History (5)
comment:1 by , 15 years ago
comment:2 by , 15 years ago
comment:3 by , 15 years ago
Okay, should be fixed now. I can't test on MSVC 7.1 though. Thanks for the report.
comment:4 by , 15 years ago
|Status:||new → closed|
comment:5 by , 5 years ago
|Component:||→ Engine: Kyra|
We have our own "PI" constant, which should be used instead of M_PI. I'd say, _USE_MATH_DEFINES and #include <math.h> should simply go.