最近在使用一个叫FairyGUI的UI工具,作者在征求闲人帮他编译个mac版的支持mp3版的sox,于是顺手编译了一下,助人助几.

依赖项很多,直接照文档编译出来的包,不能发给别人用,因为依赖了自己系统下的某些库. 将最后编译配置的命令记录一下.

./configure CFLAGS="-m32 -arch i386" LDFLAGS="-L/usr/local/lib" CPPFLAGS="-I/Users/libmad-0.15.1b -I/Users/lame-398-2/include -I/Users/libpng-1.6.29 -I/Users/libid3tag-0.15.1b -I/Users/Wubing/Downloads/libvorbis-1.3.5/include -I/Users/Wubing/Downloads/libogg-1.3.2/include" --with-ogg --with-mad --with-lame --with-id3tag --with-png --disable-shared --enable-static

关键点在于后面每多一个类似--with-mad的扩展,前面的CPPFLAG里面就要加上对应的目录,同时设置--disable-shared --enable-static,同时每个链接库的cpu架构需统一.