Seems like you at least need Carbon and AppKit (using flags "-framework Carbon", etc., for both compilation and linking, usually). No clue where that Midi* stuff comes from. You should know what you're linking against, though, it's up to you to know what you're linking against, after all you have the code and we don't