Compile LAME as External

    Jan 24 2011 | 4:54 pm
    Hi I'm trying to wrap lame in an external to decode mp2 audio files. As a standalone I don't have problems with compiling. Inside the Max-Framework I got stuck: Lame needs a higher sdk than 10.4. on MacBookPro in xCode 3.2 and is working with the 32/64 architecture. I am assuming that I only can use Lame with the libmp3lame.dylib as an included framework. My problem is now that I cannot compile an external, because the error then is
    ld: warning: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libmp3lame.dylib, file is not of required architecture
    The other way: if I chose a higher sdk Max is throwing a lot of errors like: /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:20:0 /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:20:6: error: #error 64-bit not supported
    Perhaps I am totally wrong with all my asumptions and I am also not clear with the choice of architecture.
    Any help is appreciated!
    Thanks in advance
    Best Regards, Johannes

    • Jan 24 2011 | 5:29 pm
      Hi Johannes,
      The problem is trying to compile a 64-bit binary. In your target settings for the extern you should simply specify "i386" instead of a Universal Binary.
      Cheers, Tim
    • Jan 25 2011 | 4:01 pm
      Hi Tim,
      thanks for the advice. I had to compile LAME again with the arch=i386 and this post helped me a lot:
      Best, Johannes