Linking against a static library with Projucer and Xcode?

You’ll have to forgive me if this doesn’t work; the project I’ve been working on for three years started out with one part of it being a static library that was linked into the other part, before I made a JUCE module out of it and dumped that approach. That was awhile ago.

But checking my notes, what I used to have to do, in the Projucer Xcode Exporter:

In “Extra Linker Flags”:

-L../../folderContainingTheLib

This is a path to the directory containing the lib, relative to the main Xcode project (file that is generated by Projucer).

Then in “External Libraries to Link” section, you would put (example):

MyLibrary

(note that the library file is actually named libMyLibrary.a, but you leave off ‘lib’ and ‘a’). I don’t remember why, but that is what used to work for me.

So in your case, I guess that would be zippp_static .

Another caveat: my static library was created with a separate Projucer Static Library project… may not matter…

EDIT: here, I dug up an old link where I think I got some help. Good luck!

1 Like