Game Development Community

CPU_TYPE_X86_64 was not declared for this scope

by Martin Schultz · in Torque Game Engine · 06/10/2007 (5:33 am) · 2 replies

In my adventure of getting TGE working under OSX I'm now stuck in compiling the TGE 1.5.2 mac version. The 1.4.2 compiled fine and runs also fine on my Intel Mini 1,66 GHz / 2GB memory. In the 1.5.2 version the compile stops with this error:

error: 'CPU_TYPE_X86_64' was not declared in this scope

Souce file is macCarbCPUInfo.cc line 240:

[b]case CPU_TYPE_X86_64:[/b]
         torqueCpuString = "x86";
         torqueCpuType = CPU_X86Compatible;
         break;

Does anyone know what this means?

Thanks,
Martin

#1
06/11/2007 (12:03 pm)
Which version of XCode are you using? 2.4.1 is the latest.

*greps a bit*

lefty:/Developer/SDKs/MacOSX10.4u.sdk chunky$ grep -ri 'CPU_TYPE_X86_64' . 2>/dev/null
./System/Library/Frameworks/Kernel.framework/Headers/mach/machine.h:#define    CPU_TYPE_X86_64          (CPU_TYPE_X86 | CPU_ARCH_ABI64)
./System/Library/Frameworks/Kernel.framework/Versions/A/Headers/mach/machine.h:#define  CPU_TYPE_X86_64         (CPU_TYPE_X86 | CPU_ARCH_ABI64)
./System/Library/Frameworks/Kernel.framework/Versions/Current/Headers/mach/machine.h:#define    CPU_TYPE_X86_64         (CPU_TYPE_X86 | CPU_ARCH_ABI64)
./usr/include/mach/machine.h:#define    CPU_TYPE_X86_64         (CPU_TYPE_X86 | CPU_ARCH_ABI64)
lefty:/Developer/SDKs/MacOSX10.4u.sdk chunky$ cd ../MacOSX10.3.9.sdk/
lefty:/Developer/SDKs/MacOSX10.3.9.sdk chunky$ grep -ri 'CPU_TYPE_X86_64' . 2>/dev/null
lefty:/Developer/SDKs/MacOSX10.3.9.sdk chunky$

That's only defined in the 10.4 universal bit, not in 10.3. Presumably this is what happens if you try to compile a universal binary against the 10.3 sdk?

Gary (-;
#2
06/11/2007 (12:30 pm)
Doh! Just checked it - I'm using the stock 2.3 version that comes with the OSX installer DVD. Guess I need to update that first, right?

Thanks for pointing that out. Guess it's because of the old XCode version. Will try to download the latest now and report then if it worked.