Opened 16 years ago

Closed 16 years ago

Last modified 6 years ago

#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 fingolfin, 16 years ago

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.

comment:2 by fingolfin, 16 years ago

Owner: set to lordhoto

comment:3 by athrxx, 16 years ago

Okay, should be fixed now. I can't test on MSVC 7.1 though. Thanks for the report.

comment:4 by athrxx, 16 years ago

Owner: changed from lordhoto to athrxx
Resolution: fixed
Status: newclosed

comment:5 by digitall, 6 years ago

Component: Engine: Kyra
Note: See TracTickets for help on using tickets.