TonicAudio / Tonic

Easy and efficient audio synthesis in C++
The Unlicense
523 stars 63 forks source link

Document steps for including Tonic lib in another project #138

Open morganpackard opened 11 years ago

morganpackard commented 11 years ago

So far, I've failed twice, with two different projects, adding Tonic as a static library. I think it would be a good idea to write up step-by-step what needs to happen for this to work.

ndonald2 commented 11 years ago

No problem, I can do that right now if you want to add it to the README or wherever. Obviously for XCode only, feel free to edit the images to highlight the important stuff if you want.

1) Add the lib/TonicLib.xcodeproj file to your project. To do this, drag it from the Finder to your project navigator

Screen Shot 2013-04-29 at 10 01 41 AM

2) Add the Tonic/ directory as a recursive header search path in Build Settings. Click your project file in the project navigator, click your build target in the left panel, go to Build Settings->Header Search Paths and add the Tonic/ directory (wherever it is located on your machine, relative or absolute path):

Screen Shot 2013-04-29 at 10 04 13 AM

3) Click the Build Phases tab and add the proper libTonic target for your platform (iOS or OSX) as a build dependency and a library to link with. If you've added the project file (step 1) it should show up at the top of the list when you click "+" on both of these panels.

Screen Shot 2013-04-29 at 9 59 42 AM

ndonald2 commented 11 years ago

BTW I'd like to get your opinion on cross-platform compatibility and relative include paths. I've been doing some experimentation and I think for this to work on all platforms we are going to have to make a compromise in ease-of-configuration for one platform or the other. I haven't been able to find a solution that will work universally simply.

morganpackard commented 11 years ago

There's also the option of the tn prefix.

Sent from my iPhone

On Apr 29, 2013, at 10:07 AM, "Nick D." notifications@github.com wrote:

BTW I'd like to get your opinion on cross-platform compatibility and relative include paths. I've been doing some experimentation and I think for this to work on all platforms we are going to have to make a compromise in ease-of-configuration for one platform or the other. I haven't been able to find a solution that will work universally simply.

— Reply to this email directly or view it on GitHubhttps://github.com/TonicAudio/Tonic/issues/138#issuecomment-17168584 .

ndonald2 commented 11 years ago

True but the lack of recursive include paths on Windows (maybe also Linux) means that even with the tn prefix we would still have to flatten our source directory and/or separate headers and source files (like STK).

morganpackard commented 11 years ago

Maybe it would be good to get some outside opinion on this? Find someone who has some experience building cross-platform libraries?