Je viens d'ajouter une vue de tracé principal à mon application basée sur un tutoriel (http://www.switchonthecode.com/tutorials/using-core-plot-in-an-iphone-application). J'ai mis le code de dessin Core Plot dans la méthode windowDidLoad du contrôleur de fenêtre pour la fenêtre où j'ai inclus le CPLayerHostingView. Le code de la parcelle est:Erreurs de liaison lors de la construction avec Core Plot
CPXYPlotSpace *plotSpace = (CPXYPlotSpace *)graph.defaultPlotSpace;
plotSpace.xRange = [CPPlotRange plotRangeWithLocation:CPDecimalFromFloat(-6)
length:CPDecimalFromFloat(12)];
plotSpace.yRange = [CPPlotRange plotRangeWithLocation:CPDecimalFromFloat(-5)
length:CPDecimalFromFloat(30)];
CPXYAxisSet *axisSet = (CPXYAxisSet *)graph.axisSet;
CPLineStyle *lineStyle = [CPLineStyle lineStyle];
lineStyle.lineColor = [CPColor blackColor];
lineStyle.lineWidth = 2.0f;
axisSet.xAxis.majorIntervalLength = [[NSDecimalNumber decimalNumberWithString:@"5"] decimalValue];
axisSet.xAxis.minorTicksPerInterval = 4;
axisSet.xAxis.minorTicksPerInterval = 4;
axisSet.xAxis.majorTickLineStyle = lineStyle;
axisSet.xAxis.minorTickLineStyle = lineStyle;
axisSet.xAxis.axisLineStyle = lineStyle;
axisSet.xAxis.minorTickLength = 5.0f;
axisSet.xAxis.majorTickLength = 7.0f;
axisSet.xAxis.axisLabelOffset = 3.0f;
axisSet.yAxis.majorIntervalLength = [[NSDecimalNumber decimalNumberWithString:@"5"] decimalValue];
axisSet.yAxis.minorTicksPerInterval = 4;
axisSet.yAxis.minorTicksPerInterval = 4;
axisSet.yAxis.majorTickLineStyle = lineStyle;
axisSet.yAxis.minorTickLineStyle = lineStyle;
axisSet.yAxis.axisLineStyle = lineStyle;
axisSet.yAxis.minorTickLength = 5.0f;
axisSet.yAxis.majorTickLength = 7.0f;
axisSet.yAxis.axisLabelOffset = 3.0f;
CPScatterPlot *xSquaredPlot = [[[CPScatterPlot alloc]
initWithFrame:graph.defaultPlotSpace.bounds] autorelease];
xSquaredPlot.identifier = @"X Squared Plot";
xSquaredPlot.dataLineStyle.lineWidth = 1.0f;
xSquaredPlot.dataLineStyle.lineColor = [CPColor redColor];
xSquaredPlot.dataSource = self;
[graph addPlot:xSquaredPlot];
Quand je construis je reçois les erreurs suivantes:
".objc_class_name_CPPlotRange", fait référence à partir de: -pointeur littéral @__ objc @__ cls_refs @ CPPlotRange dans HistogramWindowController.o
"_CPDecimalFromFloat", référencé à partir de: - [HistogramWindowController windowDidLoad] dans HistogramWindowController.o - [HistogramWindowController windowDidLoad] dans HistogramWindowController.o - [HistogramWindowController windowDidLoad] dans HistogramWindowController.o - [HistogramWindowController windowDidLoad] dans HistogramWindowController.o
".objc_class_name_CPLineStyle", référencé à partir de: -pointeur littéral @__ objc @__ cls_refs @ CPLineStyle dans HistogramWindowController.o
".objc_class_name_CPXYGraph" , référencé à partir de: -pointeur littéral @__ objc @__ cls_refs @ CPXYGraph dans HistogramWindowController.o
".objc_class_name_CPScatterPlot", fait référence à: -pointeur littéral @__ objc @__ cls_refs @ CPScatterPlot dans HistogramWindowController.o
".objc_class_name_CPPlotSymbol", référencé à partir de: -pointeur littéral @__ objc @__ cls_refs @ CPPlotSymbol dans HistogramWindowController.o
".objc_class_name_CPColor", fait référence à: -pointeur littéral @__ objc @__ cls_refs @ CPColor à HistogramWindowController .o
".objc_class_name_CPFill", référencé à partir de: -pointeur littéral @__ objc @__ cls_refs @ CPFill dans HistogramWindowController.o
ld: symbole (s) non trouvé collect2: ld a renvoyé 1 statut de sortie
Je n'ai jamais rencontré une erreur comme celle-ci. Quelqu'un peut-il faire la lumière sur ce que le problème pourrait être?
Vive
Il m'est arrivé une chose très similaire après avoir vérifié mon projet de SVN pour récupérer et il manquait apparemment quelques unes de mes classes. Les rajouter a résolu le problème. – Sup3rpanda
Comment puis-je vérifier cela? – Rohit