tags:

views:

604

answers:

5

I'm using a powerful library called TiMidity, which I'm sure many iPhone developers have used already used. This is a platform-independent set of programs, but during compile-time in XCode (gcc compiler), there are hundreds of dependency errors that come up.

If anyone here has used TiMidity before for their apps, your advice will be gold.

Thanks everyone, Phil.

A: 

I usually use this script to compile static libraries for the iPhone, but TiMidity++ isn't a library and the API's it uses to output sound on OS X aren't available on the iPhone OS.

Here's what I've gotten so far:

  1. Save build_for_iphoneos somewhere in your path and +x it
  2. cd to the extractd TiMidity++ folder
  3. build_for_iphoneos simulator This will fail
  4. Copy timidity/newton_tables.c somewhere safe.
  5. make clean
  6. build_for_iphoneos device
  7. Manually edit timidity/makefile and remove all references to DAU_DARWIN and darwin_a
  8. Copy newton_tables.c back into the timidity subfolder and touch it
  9. make

You should now have a timidity binary that can be used from the shell on a jailbroken device (after signed via ldid of course) and object files you can include in your project.

Note: TiMidity++ is GPL, so you will have to release your application under that license if you use any part of it. Also, this is really messy because TiMidity++ wasn't designed to be used this way, all of the darwin integration is broken on iPhone OS, and automake confuses me.

rpetrich
A: 

Hi

Sorry to bother you. I am trying to get this library compiled also. I've tried these instructions several times and always get the compile error:

Undefined symbols: "_darwin_play_mode", referenced from: _play_mode_list in output.o ld: symbol(s) not found collect2: ld returned 1 exit status make[2]: * [timidity] Error 1 make[1]: * [all-recursive] Error 1 make: *** [all] Error 2

At the last step Any chance you could host the precompiled binaries for the iPhone somewhere? Or email them to me?

Many thanks

Bryan

skooter500
A: 

Hi, I have some error, could you share you iphone build?

Altermann
A: 

Happy New Year!

Somebody please provide already compiled timidity (object file) for iphone, if you built it. I tried but i can't do it (.

Altermann
A: 

You have to remove AU_DARWIN from ./Makefile as well as timidity/Makefile.

arya