What’s the correct method to use either a debug or release build of the jucelibrary when you’re making debug/release builds. I thought I tried simply linking to the appropriate directory (build/Development or build/Deployment) without having the library actually included in the project. I recall this not working. Is there a way to do this?
Cheers
I wish I had a better solution that the current one, but XCode seems determined to always use the same folder for intermediate files regardless of the build type, and linking an app to differently-named libraries depending on whether it’s a debug configuration also seems to be beyond it.
I’m no XCode expert though, so if anyone out there knows tricks to get around this stuff, I’d love to hear about it!
I’ll dink around and see if I can come up with anything when I have time. There is a path for libraries in the Target->GetInfo->Build pane, but not sure if that works or not.
put …/…/bin in “Installation Directory” instead of “Installation Build Products Location” (this was a mistake since it is used for install builds, whatever that is…)
In Development put “juced” as the "Product Name"
In Deployment put “juce” as the “Product Name”
EDIT also need to put the relevant macros for each conifugration (i.e. DEBUG/_DEBUG) in the Preprocessor Macros
I tested it and it works although it still build the libraries under build/bin and put an alias under bin but I leave that for you since my project will work with the alias anyway
I’m looking into this at the moment. Building differently-named libs is easy enough, but how are you linking to them from your app? I can’t see a way of making it link to different libs depending on which build configuration is is use.
I didn’t do it yet but probably usgin some “Other link flags” property which is different for debug and release. Hope it is possible to avoid multiple targets
I used to do it that way, except that it doesn’t take dependencies into account. (Though to be fair it never actually does the dependencies correctly the other way either)
You mean if you change the JUCE library, it doesn’t rebuild the app? Yeah, that’s irritating.
Visual Studio on Windows does the same thing, unless there’s some way to tweak VS that I don’t know. Anyhow, doing it this way beats having separate targets.
I know am more than 3 years late, but I would like to suggest two option
option 1 :
Add two targets tot he project one for debug which doesn’t support release and another for reease
option 2 :
This is a better option, build juce in two different folder(Debug & Release) with same name and go to target info >> Build tab and select library search path based on whether it is debug or release mode select appropriate folder in the option