Runtime error about sox library in cocoa application
I am trying to sox libra开发者_运维问答ry into my project and installed library using ./configure, make and make install and linked to the libsox.dylib into my project. I am not getting compiler error but getting run time error .
Now i am getting following error,
[Session started at 2010-03-03 17:33:44 +0530.] dyld: Library not loaded: /usr/local/lib/libmp3lame.0.dylib Referenced from: /usr/local/lib/libavformat.dylib Reason: no suitable image found. Did find: /usr/local/lib/libmp3lame.0.dylib: mach-o, but wrong architecture /usr/local/lib/libmp3lame.0.dylib: mach-o, but wrong architecture The Debugger has exited due to signal 5 (SIGTRAP).The Debugger has exited due to signal 5 (SIGTRAP).
So anyone please tell me exact procedure to install sox library into mac os.
Regards, CocoaDev
You're probably trying to mix different architectures, e.g. 32 bit and 64 bit code, or x86 and ARM. Use file
to check the architecture of the dyld and compare that with the architecture of whatever it is that you are trying to build.
$ man file
Here's the quick fix: when you install the program, run "configure" this way:
./configure CFLAGS='-O2 -arch x86_64 ...' LDFLAGS='-arch x86_64 ...'
List all your desired archs, each with a separate -arch. This is known to sometimes break. For example, do NOT compile LibSDL this way, you will get incorrect output (weird colors and stuff). Unfortunately, it is quite possible that sox suffers from the similar problems, so be sure to test it on all the archs you want to ship with.
精彩评论