我正在尝试使用AudioKit 4.1学习一个基本教程。我首先在项目中导入了AudioKit框架,如下图所示。

导入AudioKit框架之后,我在ViewController中添加了几行代码如下:
import UIKit
import AudioKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
let oscillator = AKOscillator()
oscillator.amplitude = 0.1
AudioKit.output = oscillator
oscillator.start()
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}运行代码时,我得到了59错误,如下图所示。你是怎么修好的?

发布于 2018-03-09 11:00:51
从4.1版开始,AudioKit现在作为一个静态框架提供。因为所有的内部C++代码,它依赖于标准的C++库。这个依赖关系过去是由动态链接器自动解决的,但不再是这样了。
使这些错误消失的最简单方法是在Xcode中的目标设置中添加-lstdc++链接器标志(在“其他链接器标志”下)。
https://stackoverflow.com/questions/49191858
复制相似问题