#3807 closed defect (fixed)
KYRA: does not compile in MSVC71
Reported by: | SF/quietust | Owned by: | athrxx |
---|---|---|---|
Priority: | normal | Component: | Engine: Kyra |
Version: | Keywords: | ||
Cc: | Game: |
Description
"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 , 16 years ago
comment:2 by , 16 years ago
Owner: | set to |
---|
comment:3 by , 16 years ago
Okay, should be fixed now. I can't test on MSVC 7.1 though. Thanks for the report.
comment:4 by , 16 years ago
Owner: | changed from | to
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:5 by , 6 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.