[問題] Framework裡的Header檔不能用
各位板上先進
以下是我的MyDocument.h檔:
#import <Cocoa/Cocoa.h>
#import <QTKit/QTKit.h>
@interface MyDocument : NSDocument
{
IBOutlet QTCaptureView *mCaptureView;
IBOutlet QTMovieView *mMovieView;
IBOutlet NSImageView *mImageView;
IBOutlet NSTextField *mMovieTime;
IBOutlet NSTextField *mWidth;
IBOutlet NSTextField *mHeight;
QTMovie *mMovie;
QTCaptureSession *mCaptureSession;
QTCaptureDeviceInput *mVideoDeviceInput;
QTCaptureDeviceInput *mAudioDeviceInput;
QTCaptureDecompressedVideoOutput *mCaptureDecompressedVideoOutput;
===>QTCaptureDecompressedAudioOutput *mCaptureDecompressedAudioOutput;
CVImageBufferRef mCurrentImageBuffer;
}
- (IBAction)addFrame:(id)sender;
@end
其中有加箭頭的那一行就是問題所在
XCode辨識不出它是保留字(它是QTKit中的一個Class 來輸出無壓縮過的audio)
所以在編譯的時候就出現下列的錯誤訊息:
Expected specifier-listqualifier-list before'QTCaptureDecompressedAudioOutput'
然後我跑去google它
有這麼一個解釋 http://tinyurl.com/28xt57u
照它上面的改法後 也跟著出現它聞中的一個警告:
warning: receiver 'QTCaptureDecompressedAudioOutput' is a forward class and
corresponding @interface may not exist
所以現在還是沒有辦法improt那個class
有沒有別的辦法可以把那個class包進來??
好怪!
明明QTKit就有包進那個class
感謝!!
P.S 我是用官網上的範例'StillMotion'做更改的
附上連結 http://tinyurl.com/238rrpl
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.219.177.46
※ 編輯: ryanliang 來自: 61.219.177.46 (10/07 14:46)
討論串 (同標題文章)
以下文章回應了本文:
完整討論串 (本文為第 1 之 2 篇):
MacDev 近期熱門文章
PTT數位生活區 即時熱門文章