Search code examples
c++xcodemacosgccsoundtouch

SoundTouch compilation with Xcode?


I'm trying to compile SoundTouch Framework in my Xcode project, but I have no clue of what I'm doing to be honest.

Does anyone have any instructions?

What I've done so far

Running ./bootstrap gives me the following output

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

If I recall correctly, there is no autoreconf for Mac OS, right?

SoundTouch apparently requires at least GCC 4.4 but Mac OS only has GCC 4.3, so I downloaded GCC 7 from homebrew, but using it only with the command gcc-7 ./bootstrap gives me the following output

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

How can I successfully compile SoundTouch?

EDIT:

I tried copying the essential files to one folder, add it to my project and compile.

Now I get this error:

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)

Why is it saying that there are undefined symbols?


Solution

  • I copied the essential files of SoundTouch to the project's "Compile Sources" definition.

    Now it compiles.

    enter image description here