3

我正在尝试将一些库导入到今天的扩展中(在主应用程序中工作正常)。当我运行该应用程序时,我收到以下错误:

Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_Budget", referenced from:
      objc-class-ref in TodayViewController.o
  "_OBJC_CLASS_$_JBBarChartView", referenced from:
      objc-class-ref in TodayViewController.o
  "_OBJC_CLASS_$_Users", referenced from:
      objc-class-ref in TodayViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

以下是进口:

#import "JBBarChartView.h"
#import "JBChartView.h"
#import "Users.h"
#import "Budget.h"

有什么建议么?

4

1 回答 1

0

如果您使用 pod 并导入一些库,您可以像这样编辑 Podfile:

target 'MyApp' do
  pod 'GoogleAnalytics', '~> 3.1'

  # Has its own copy of OCMock
  # and has access to GoogleAnalytics via the app
  # that hosts the today target

  target 'MyAppToday' do
    inherit! :search_paths
    pod 'OCMock', '~> 2.0.1'
  end
end

如果您想使用自己的类,请单击此文件并检查目标成员资格。您也可以将这些文件打包为框架。

于 2016-10-18T07:25:22.173 回答