OpenTTD

Tasklist

FS#1357 - Compile error on Mac OS X: 'INT64_MAX' not declared

Attached to Project: OpenTTD
Opened by Mall Monkey (mallmonkey) - Saturday, 20 October 2007, 19:20 GMT
Last edited by Remko Bijker (Rubidium) - Saturday, 20 October 2007, 19:48 GMT
Type Bug
Category Core
Status Closed
Assigned To Bjarni (Bjarni)
Operating System Mac OS X
Severity High
Priority Normal
Reported Version trunk
Due in Version 0.6.0
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

The latest trunk (r11315) no longer compiles on Mac OS X (I've tested both on Intel and on PPC):

[..]
[SRC] Compiling music/null_m.cpp
[SRC] Compiling music/qtmidi.cpp
/Users/neil/dev/openttd/trunk/src/music/../openttd.h:73: error: 'INT64_MAX' was not declared in this scope
/Users/neil/dev/openttd/trunk/src/music/../openttd.h:73: error: 'INT64_MIN' was not declared in this scope
/Users/neil/dev/openttd/trunk/src/music/../openttd.h:73: error: template argument 2 is invalid
/Users/neil/dev/openttd/trunk/src/music/../openttd.h:73: error: template argument 3 is invalid
/Users/neil/dev/openttd/trunk/src/music/../openttd.h:73: error: invalid type in declaration before ';' token
make[1]: *** [music/qtmidi.o] Error 1
make: *** [all] Error 2

I've checked /usr/include/stdint.h on my systems, and it does define INT64_MAX (although I'm not 100% sure that's the one that's used, but 22 of the 24 stdint.h's on my (PPC) system include a define for INT64_MAX), so I'm not sure what goes wrong (stdafx.h should include <stdint.h> I think).

What's weird (to me anyway) is that economy.cpp (which also uses INT64_MAX) *does* compile. I've checked qtmidi.cpp but stdafx.h is included there (before openttd.h is included).

r11271 whas the latest revision I tried to compile, and that worked fine, so this problem was probably introduced after that.
This task depends upon

Closed by  Bjarni (Bjarni)
Sunday, 21 October 2007, 10:54 GMT
Reason for closing:  Fixed
Additional comments about closing:  r11325
this is not a midi only issue. It happened to sound and cocoa video as well.
Comment by Remko Bijker (Rubidium) - Saturday, 20 October 2007, 19:47 GMT
It's actually declared, but undeclared by an OSX header, or at least it looks like that.

You can configure OTTD without midi support and then it will compile.

Loading...