1

I need to build libsndfile for use it in my audio engine on Iphone/Ipad. I've built it without error but for an i386 architecture so I've got some errors when I build my project :

Undefined symbols for architecture i386:
  "_FLAC__StreamDecoderErrorStatusString", referenced from:
      _sf_flac_error_callback in libsndfile.a(flac.o)
  "_FLAC__StreamEncoderInitStatusString", referenced from:
      _flac_write_header in libsndfile.a(flac.o)
  "_FLAC__metadata_object_delete", referenced from:
      _flac_close in libsndfile.a(flac.o)
  "_FLAC__metadata_object_new", referenced from:
      _flac_write_header in libsndfile.a(flac.o)
  "_FLAC__metadata_object_vorbiscomment_append_comment", referenced from:
      _flac_write_header in libsndfile.a(flac.o)

How can I build it for arm architecture ?

I've found this subject where Erik de Castro Lopo said to do that :

./configure --prefix=$HOME/Arm --build=i386-linux --host=arm-unknown-linux-gnueabi

But when I build I've got this :

undefined symbols for architecture x86_64:
  "_AudioQueueAddPropertyListener", referenced from:
      _main in sndfile-play.o
  "_AudioQueueAllocateBuffer", referenced from:
      _main in sndfile-play.o
  "_AudioQueueDispose", referenced from:
      _main in sndfile-play.o
  "_AudioQueueEnqueueBuffer", referenced from:
      _main in sndfile-play.o
      _macosx_audio_out_callback in sndfile-play.o
  "_AudioQueueFreeBuffer", referenced from:
      _main in sndfile-play.o

How can I do ? Thanks!

Community
  • 1
  • 1
Dono
  • 522
  • 7
  • 11
  • That configure line is correct, assuming you have an arm-unknown-linux-gnueabi toolchain on your PATH. If it doesn't work, then this is probably a bug in the autotools configuration of libsndfile. I don't think anyone here can help you with that, you should probably report it to the author. – Andy Ross Oct 31 '12 at 15:29

1 Answers1

0

The first block of errors you see (i386/FLAC) seem to be because the configure process detected the FLAC header files, but could not find the FLAC library.

The second block of errors, which you say is from cross compiling has errors related to x86_64. Do you actually have an arm cross compiler installed?

What's the the output of the following commands (run in the libsndfile source directory after running ./configure):

$ grep _os config.log
$ grep _CC config.log
  • Thanks for your response, I've search by myself a lot to finally found this github : https://github.com/sbooth/AudioFrameworks I've tried with his xcode project, all is working now! Thanks a lot for your time and your library :) – Dono Nov 06 '12 at 20:45