Welcome to OGeek Q&A 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 Reply

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...