tags:

views:

114

answers:

3

Hi,

I am trying to sox library 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

+1  A: 

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

Paul R
A: 

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.

Dietrich Epp
A: 

Hi All,

I recompiled with correct method but still i am getting error, plz check,

[Session started at 2010-03-08 11:02:37 +0530.] dyld: Symbol not found: _mad_stream_finish Referenced from: /usr/local/lib/libsox.1.dylib Expected in: dynamic lookup

The Debugger has exited due to signal 5 (SIGTRAP).The Debugger has exited due to signal 5 (SIGTRAP).

I am adding this library from Target->General.

Does anyone have any idea?.

Many Thanks.

mobileapps