Search code examples
macosclangopenalosx-lion

How to link OpenAL on the command line (OS X)


I'm trying to compile a project which is using OpenAL on Mac OS X 10.7. If I would be using XCode I could link the OpenAL.framework, but in the directory

/System/Library/Frameworks/OpenAL.framework/

theres no subdirectory called 'Libraries'. So what should I link against?


Solution

  • This is just a generic answer to link frameworks in the Mac, it should work for OpenAL.framework

    % gcc -framework OpenAL -o test test.c
    

    Also see this old GCC article