2013-02-17 5 views
0

이 android_npapi.h 위에서 언급 한 바와 같이 android_npapi.h 파일을 컴파일 할 때이 시점에서 위의 유형의 여러 오류를 제공합니다부터 시작여러 예상 식별자 또는 '('전에 ':'토큰

struct ANPInterface { 
    uint32_t inSize;  // size (in bytes) of this struct 
}; 

enum ANPLogTypes { 
    kError_ANPLogType = 0, // error 
    kWarning_ANPLogType = 1, // warning 
    kDebug_ANPLogType = 2  // debug only (informational) 
}; 
typedef int32_t ANPLogType; 

struct ANPLogInterfaceV0 : ANPInterface { 
    /** dumps printf messages to the log file 
     e.g. interface->log(instance, kWarning_ANPLogType, "value is %d", value); 
    */ 
    void (*log)(ANPLogType, const char format[], ...); 
}; 

struct ANPBitmapInterfaceV0 : ANPInterface { 
    /** Returns true if the specified bitmap format is supported, and if packing 
     is non-null, sets it to the packing info for that format. 
    */ 
    bool (*getPixelPacking)(ANPBitmapFormat, ANPPixelPacking* packing); 
}; 

은 " 구조체 ANPLogInterfaceV0 :. android_npapi.h

답변

1

당신은 C 또는 C++로를 포함하여 코드를 컴파일하려고 : ANPInterface는 "ANPInterface의 상속을 포함하는 모든 구조체 정의는 위의 오류에 대한 추가 정보를 원하시면

이 헤더 파일을 말했다 준다? 그 헤더는 struct 상속을 사용하기 때문에 C++로 컴파일해야합니다.

+0

맞아, 그럴 가능성이 더 높습니다. –

+0

@smorgan 네, 그게 문제였습니다 ... 나중에 알아 냈습니다. 귀하의 의견을 보내 주셔서 감사합니다! – harshalizee