Error: The expected list of qualifiers before "QTVisualContextRef"

I am currently getting this error message in my header code, and I'm not sure why:

"Error: expected list of qualifiers 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; 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 that I saw through another code (for example, Cocoa Video Tutorial ), I did not see any difference in their code for mine. If someone could indicate how this error could occur, that would be great. Thanks, heaps! :)

0
source share
2 answers

If you are compiling as a 64-bit application, QTVisualContextRef is not available to you. You will need to compile the application as 32-bit.

Apple has not yet fully focused QTKit on the 64-bit level ...

+6
source

This is a GCC error, and this means that the QTVisualContextRef token QTVisualContextRef not known to the compiler. This is a pretty bad error message. You need to add the correct #import , which the compiler will teach about this type. This is part of the QuickTime environment, so you probably want to

 #import <QuickTime/QuickTime.h> 
+1
source

All Articles