Sean Kennedy
Sean Kennedy

Reputation: 33

Xcode Static Library Linking with GLFW 3.3

I recently cloned, built, and installed the most recent version of GLFW 3.3 on Mac, and have attempted to link it to my project, but have been having some major problems in doing so.

From what I can tell, the actual library is linking, but a ton of the Cocoa frameworks are not linking. Here's an abridged form of the actual linker error message:

enter image description here

The library for the GLFW is a static library (with the .a extension), and I am including it via the "Link Binary with Libraries Interface", and is on the path "/usr/local/lib/", which I also specified in the Library Search Path category under Build Settings.

What should I do to begin addressing this problem? Is it clear what I am doing wrong or is more information needed? There is a ton of other information that I could include, but I am honestly unsure what is relevant to addressing the problem.

Upvotes: 0

Views: 299

Answers (1)

Brett Hale
Brett Hale

Reputation: 22318

Looking at $prefix/lib/pkgconfig/glfw3.pc, lists framework dependencies:

-framework Cocoa -framework IOKit -framework CoreFoundation -framework CoreVideo

Add these to the linker options.

Upvotes: 2

Related Questions