Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.0k views
in Technique[技术] by (71.8m points)

xcode - TiMidity: need help compiling this library for the iPhone

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...