【问题标题】:SoundTouch compilation with Xcode?SoundTouch 用 Xcode 编译?
【发布时间】:2018-05-15 05:15:11
【问题描述】:

我正在尝试在我的 Xcode 项目中编译 SoundTouch 框架, 但老实说,我不知道自己在做什么。

有人有什么指示吗?

到目前为止我做了什么

运行 ./bootstrap 给我以下输出

autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal -I config/m4 --output=aclocal.m4t
Can't exec "aclocal": No such file or directory at /usr/local/Cellar/autoconf/2.69/share/autoconf/Autom4te/FileUtils.pm line 326.
autoreconf: failed to run aclocal: No such file or directory

如果我没记错的话,Mac OS 没有autoreconf,对吧?

SoundTouch 显然至少需要GCC 4.4,但 Mac OS 只有GCC 4.3,所以我从homebrew 下载了GCC 7,但仅与命令gcc-7 ./bootstrap 一起使用会得到以下输出

gcc-7 bootstrap
ld: warning: ignoring file bootstrap, file was built for unsupported file format ( 0x23 0x20 0x24 0x49 0x64 0x3A 0x20 0x62 0x6F 0x6F 0x74 0x73 0x74 0x72 0x61 0x70 ) which is not the architecture being linked (x86_64): bootstrap
Undefined symbols for architecture x86_64:
  "_main", referenced from:
     implicit entry/start for main executable
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status

如何成功编译 SoundTouch?

编辑:

我尝试将基本文件复制到一个文件夹,将其添加到我的项目并编译。

现在我得到这个错误:

Undefined symbols for architecture x86_64:
  "soundtouch::SoundTouch::SoundTouch()", referenced from:
      MyAudioProcessor::MyAudioProcessor() in libMy.a(PluginProcessor.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

为什么说有未定义的符号?

【问题讨论】:

    标签: c++ xcode macos gcc soundtouch


    【解决方案1】:

    我将 SoundTouch 的基本文件复制到项目的“编译源”定义中。

    现在它可以编译了。

    【讨论】:

    • 您是否为导入 .h 文件创建桥接头?如果没有,您是如何通过仅在编译源中添加声音触摸功能来使用它的?
    • 无桥接头。我不明白你到底在问我什么。
    猜你喜欢
    • 2013-09-17
    • 1970-01-01
    • 2017-12-13
    • 2011-03-09
    • 1970-01-01
    • 1970-01-01
    • 2023-03-25
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多