QCCompositionLayerでコンパイルエラー
公開日:
:
cocoa
記事内に広告を含む場合があります。記事内で紹介する商品を購入することで、当サイトに売り上げの一部が還元されることがあります。
Xcodeでコンパイルエラー。
QCCompositionLayer *rootLayer;
/Users/user/Desktop/CoreAnimationMenu/MenuView.m:45: error: 'QCCompositionLayer' undeclared (first use in this function)
リファレンスを確認。
QCCompositionLayer Class Reference
Declared in QuartzComposer/QCCompositionLayer.h
プログラムの先頭のほうに以下の行を追加。
#import <QuartzComposer/QCCompositionLayer.h>
再度コンパイル。
/Users/user/Desktop/CoreAnimationMenu/MenuView.m:12:46: error: QuartzComposer/QCCompositionLayer.h: No such file or directory
ありゃりゃ。検索してみる。
/Users/user% find /System/Library/Frameworks -name "QCCompositionLayer.h"
/System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/QuartzComposer.framework/Versions/A/Headers/QCCompositionLayer.h
“Versions/A” って何だ?
/Users/user% ls /System/Library/Frameworks/Quartz.framework
CodeResources Headers Resources
Frameworks Quartz Versions
/Users/user% ls /System/Library/Frameworks/Quartz.framework/Versions
A Current
/Users/user% ls /System/Library/Frameworks/Quartz.framework/Versions/A
CodeResources Frameworks Headers Quartz Resources
/Users/user% ls /System/Library/Frameworks/Quartz.framework/Versions/Current
CodeResources Frameworks Headers Quartz Resources
むむむっ?複数のバージョンが入ってるのか??
追記
#import <Quartz/Quartz.h>
したら通った。
/Users/user% cat /System/Library/Frameworks/Quartz.framework/Headers/Quartz.h
/* Quartz.h
Copyright (c) 2004 Apple Computer, Inc.
All rights reserved. */
#import <QuartzCore/QuartzCore.h>
#import <QuartzComposer/QuartzComposer.h>
#import <QuartzFilters/QuartzFilters.h>
#import <PDFKit/PDFKit.h>
#import <ImageKit/ImageKit.h>
これが「全部入り」、ってことかな??
/Users/user% find /System/Library/Frameworks -name "QuartzCore.h"
/System/Library/Frameworks/QuartzCore.framework/Versions/A/Headers/QuartzCore.h
/Users/user% cat /System/Library/Frameworks/QuartzCore.framework/Versions/A/Headers/QuartzCore.h
/* QuartzCore.h
Copyright (c) 2004 Apple Computer, Inc.
All rights reserved. */
#import <QuartzCore/CoreImage.h>
#import <QuartzCore/CoreVideo.h>
#import <QuartzCore/CoreAnimation.h>
/Users/user% find /System/Library/Frameworks -name "QuartzComposer.h"
/System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/QuartzComposer.framework/Versions/A/Headers/QuartzComposer.h
/Users/user% cat /System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/QuartzComposer.framework/Versions/A/Headers/QuartzComposer.h
/*
Copyright: (c) 2003-2007 by Apple, Inc., all rights reserved.
*/
#import <QuartzComposer/QCPlugIn.h>
#import <QuartzComposer/QCComposition.h>
#import <QuartzComposer/QCCompositionRepository.h>
#import <QuartzComposer/QCRenderer.h>
#import <QuartzComposer/QCCompositionLayer.h>
#import <QuartzComposer/QCView.h>
#import <QuartzComposer/QCCompositionParameterView.h>
#import <QuartzComposer/QCCompositionPickerView.h>
#import <QuartzComposer/QCCompositionPickerPanel.h>
#import <QuartzComposer/QCPlugInViewController.h>
/Users/user% find /System/Library/Frameworks -name "QuartzFilters.h"
/System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/QuartzFilters.framework/Versions/A/Headers/QuartzFilters.h
/Users/user% cat /System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/QuartzFilters.framework/Versions/A/Headers/QuartzFilters.h
/*
* QuartzFilters - QuartzFilters.h
* Copyright (c) 2005 Apple Computer, Inc.
* All rights reserved.
*/
#ifndef QUARTZFILTERS_H_
#define QUARTZFILTERS_H_
#import <QuartzFilters/QuartzFilter.h>
#import <QuartzFilters/QuartzFilterManager.h>
#endif /* QUARTZFILTERS_H_ */
/Users/user% find /System/Library/Frameworks -name "PDFKit.h"
/System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/PDFKit.framework/Versions/A/Headers/PDFKit.h
/Users/user% cat /System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/PDFKit.framework/Versions/A/Headers/PDFKit.h
// =====================================================================================================================
// PDFKit.h
// =====================================================================================================================
#import <PDFKit/PDFAction.h>
#import <PDFKit/PDFActionGoTo.h>
#import <PDFKit/PDFActionNamed.h>
#import <PDFKit/PDFActionResetForm.h>
#import <PDFKit/PDFActionRemoteGoTo.h>
#import <PDFKit/PDFActionURL.h>
#import <PDFKit/PDFAnnotation.h>
#import <PDFKit/PDFAnnotationButtonWidget.h>
#import <PDFKit/PDFAnnotationChoiceWidget.h>
#import <PDFKit/PDFAnnotationCircle.h>
#import <PDFKit/PDFAnnotationFreeText.h>
#import <PDFKit/PDFAnnotationInk.h>
#import <PDFKit/PDFAnnotationLine.h>
#import <PDFKit/PDFAnnotationLink.h>
#import <PDFKit/PDFAnnotationMarkup.h>
#import <PDFKit/PDFAnnotationPopup.h>
#import <PDFKit/PDFAnnotationSquare.h>
#import <PDFKit/PDFAnnotationStamp.h>
#import <PDFKit/PDFAnnotationText.h>
#import <PDFKit/PDFAnnotationTextWidget.h>
#import <PDFKit/PDFBorder.h>
#import <PDFKit/PDFDestination.h>
#import <PDFKit/PDFDocument.h>
#import <PDFKit/PDFOutline.h>
#import <PDFKit/PDFPage.h>
#import <PDFKit/PDFSelection.h>
#import <PDFKit/PDFThumbnailView.h>
#import <PDFKit/PDFView.h>
/Users/user% find /System/Library/Frameworks -name "ImageKit.h"
/System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/ImageKit.framework/Versions/A/Headers/ImageKit.h
/Users/user% cat /System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/ImageKit.framework/Versions/A/Headers/ImageKit.h
//
// ImageKit.h
// ImageKit
//
// Copyright 2006 Apple. All rights reserved.
//
// Image Browser
#import <ImageKit/IKImageBrowserView.h>
// Image Picker
#import <ImageKit/IKPictureTaker.h>
// Core Image Kit
#import <ImageKit/IKFilterUI.h>
#import <ImageKit/IKFilterUIView.h>
#import <ImageKit/IKFilterBrowserPanel.h>
#import <ImageKit/IKFilterBrowserView.h>
// Slideshow
#import <ImageKit/IKSlideshow.h>
// SaveOptions
#import <ImageKit/IKSaveOptions.h>
// ImageView
#import <ImageKit/IKImageView.h>
// Image edit panel
#import <ImageKit/IKImageEditPanel.h>
// Deprecated - for compatibilities
#import <ImageKit/ImageKitDeprecated.h>
深追いはここら辺にしておいて、ひとまず先に進むとするか…。