Error: expected specifier-qualifier-list before 'QTVisualContextRef'
I am currently getting this error message in my header code, and I'm not sure as to why:
"Error: expected specifier-qualifier-list before 'QTVisualContextRef'"
#import <Cocoa/Cocoa.h>
#import <QTKit/QTKit.h>
#import <OpenGL/OpenGL.h>
#import <QuartzCore/QuartzCore.h>
#import <CoreVideo/CoreVideo.h>
@interface MyRecorderController : NSObject {
IBOutlet QTCaptureView *mCaptureView;
IBOutlet NSPopUpButton *videoDevicePopUp;
NSMutableDictionary *namesToDevicesDictionary;
NSString *defaultDeviceMenuTitle;开发者_如何学Go
CVImageBufferRef mCurrentImageBuffer;
QTCaptureDecompressedVideoOutput *mCaptureDecompressedVideoOutput;
QTVisualContextRef qtVisualContext; // the context the movie is playing in
// filters for CI rendering
CIFilter *colorCorrectionFilter; // hue saturation brightness control through one CI filter
CIFilter *effectFilter; // zoom blur filter
CIFilter *compositeFilter; // composites the timecode over the video
CIContext *ciContext;
QTCaptureSession *mCaptureSession;
QTCaptureMovieFileOutput *mCaptureMovieFileOutput;
QTCaptureDeviceInput *mCaptureDeviceInput;
}
@end
In the examples I have seen through other code (e.g. Cocoa Video Tutorial) I have not seen any difference in their code to mine. If anyone would be able to point out as to how this error could have occurred that would be great. Thanks heaps! :)
If you are compiling as a 64-bit application, QTVisualContextRef is not available to you. You'll need to compile the application as 32-bit.
Apple hasn't fully fleshed out QTKit to be 64-bit quite yet...
That's a GCC error and it means the token QTVisualContextRef
is not known to the compiler. It's a rather poor error message indeed. You need to add the correct #import
that will teach the compiler about this type. It's part of the QuickTime framework, so you probably want
#import <QuickTime/QuickTime.h>
精彩评论