Runtime error about sox library in cocoa application

Discussion in 'Mac Programming' started by iphonemobdev, Mar 4, 2010.

  1. iphonemobdev macrumors newbie

    Joined:
    Jan 29, 2010
    #1
    Hi,

    I am trying to sox library into my project and installed library using ./configu4re, 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
     
  2. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #2
    This is telling you that libmp3lame.0.dylib is the wrong architecture.

    That means you haven't compiled it for the architecture you're running. Most likely, it's been compiled for ppc and i386, but you're running under x86_64 on Snow Leopard.

    Go back and remake the library that failed, and read make's output. Figure out what it's doing to compile the 2 architectures, then modify it to compile for the 3rd architecture.

    You can check what architectures are in a compiled library with this Terminal command:
    Code:
    file /path/to/library.dylib
    
     
  3. iphonemobdev thread starter macrumors newbie

    Joined:
    Jan 29, 2010
    #3
    Hi chown33,

    Thanks for reply,

    I checked and i try with correct architecture.

    Now i am getting another error like,

    ===
    [Session started at 2010-03-06 15:23:55 +0530.]
    dyld: Symbol not found: _mad_stream_finish
    Referenced from: /usr/local/lib/libsox.dylib
    Expected in: dynamic lookup


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

    I don't know why i am getting this error.

    Regards,
    CocoaDev.
     
  4. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #4
    There's a pretty clear reason for the error. You should be able to figure out what it's trying to tell you. What do you think that error means?
     

Share This Page