tags:

views:

132

answers:

1

Hello,

Tasked with converting wav to mp3 in my mac program, I've downloaded and compiled the LAME encoder. I was wondering how I then use it in my xcode project? Previous 3rd party libraries have been in the form of a framework, but LAME just produces a dylib.

Thank you.

A: 

The use of a dynamic library is similar to a Framework Apple doc on dynamic libraries

The library will need to be in a known place

In the target build options set the header and library search paths. To use the library drag it into Xcode (These set the -I -L and -l options to the compiler)

Mark
Hi, sorry about the delay in getting back to this. I've added usr/local/lib (where libmp3lame.dylib is) to the library search paths and usr/local/include/lame (where lame.h is) to the header search paths. I can add the libmp3lame.dylib to the target's linked libraries or i can drag the dylib into the project and they get added. But when it comes to usage, I cannot include the header file.
Septih
Those paths should begin with a / Also what is the code line you do the include with
Mark
That did the trick. I initially tried with a starting / but it complained about something, so I tried without. Anyway I can now import lame.h and compile. Now just to make sure it's working. Thanks very much.
Septih