내가 다음 코드 덩어리에, MacTypes.h에 두 줄의 형식 정의 재정의 오류를 받고 있어요에서 MacTypes.h에서 UINT32의으로 typedef 재정의 :정의에서 CFBase.h
#if __LP64__
typedef unsigned int UInt32;
typedef signed int SInt32;
#else
typedef unsigned long UInt32; // error here
typedef signed long SInt32; // error here
#endif
연타 , CFBase.h에서 (CoreFoundation.framework에서) 다음과 같은 이전의 정의에 오류 점 :
#if !defined(__MACTYPES__)
#if !defined(_OS_OSTYPES_H)
typedef unsigned char Boolean;
typedef unsigned char UInt8;
typedef signed char SInt8;
typedef unsigned short UInt16;
typedef signed short SInt16;
typedef unsigned int UInt32; // previous definition is here
typedef signed int SInt32; // previous definition is here
typedef uint64_t UInt64;
typedef int64_t SInt64;
typedef SInt32 OSStatus;
#endif
...
__LP64__
분명히 항상 맥 플랫폼에 사실이기 때문에 이것은 매우 이상하다, 왜 타입 정의도 평가되고 있음 ? 그리고 OS가 제공하는 두 개의 정의가 서로 모순되는 편집의 경로가있는 이유는 무엇입니까?
편집 : 다음은 Xcode의 오류 스크린 샷입니다.
나는 내 클라이언트의 이름을 (파일이 모두 오류에 대해 동일) 포함하고 있기 때문에 <Carbon/Carbon.h>
을 포함하는 파일의 경로를 지워졌습니다. 그 아래의 전체 경로 이름 (모든 Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks 포함)은 다음과 같습니다 :
- Carbon.framework/헤더/Carbon.h :
- 20 CoreServices.framework/헤더/CoreServices.h : CoreServices.framework/프레임 워크 (18)
- /AE.framework/헤더/AE.h : 20
- CoreServices에. 프레임 워크/프레임 워크/CarbonCore.framework/헤더/CarbonCore.h : 27
- CoreServices.framework/Frameworks/CarbonCore.framework/Headers/MacTy pes.h : 27
업데이트 : 나는 '아무튼 받고 있어요
#if __LP64__
#error Has LP64
#else
#error Doesn't have LP64
#endif
... 그리고 : 나는 다음과 같은 추가 한 단지 #include <Carbon/Carbon.h>
전에 내 자신의 코드에서
, 'LP64'오류가있어 문제의 근원 인 것 같습니다. 내가 컴파일 할 때 그러나, (SublimeClang와) 숭고한 텍스트 2
int main()
{
#if __LP64__
#error Has LP64
#else
#error Doesn't have LP64
#endif
return 0;
}
다음 ... 나는 "LP64을 가지고"얻는다. #define __LP64__
에 대한 프로젝트 텍스트 검색 내 프로젝트에서 아무 것도 찾을 수 없으며 __LP64__
을 검색 할 때 #if
및 #ifdef
의로드가 발생합니다. 누구든지이 오류가 어디에서 왔는지 알 수 있습니까?
숭고한 텍스트에서 어떤 컴파일러를 사용하고 있습니까? 컴파일러에 전달되는 옵션은 무엇입니까? Xcode 프로젝트에서 어떤 컴파일러를 사용하고 있습니까? 컴파일러에 전달되는 옵션은 무엇입니까? 32 비트 용으로 아직 컴파일 중입니까? –