Linking error: Library not found

Hi,
I am using xcode 12.4 and In a macOS/OSX project I am getting a linking error Library not found.
The mac os app is using a C++ library that is being successfully built in the xcode workspace, but the linker fails to find it
I have added that dependency Cpp library in the "Link binary with Libraries" (Build phases)

I think my Library search paths setting in Build Settings is not correct,
The output of workspace which includes the C library is in the Derived data, how can I specify derived data path as variable and use it to point to C library folder ?
Thanks,
Ahmed


What do you mean by "library"?

You could have a static archive library that would directly link into your executable like any other object code.

You could have a framework, which is a fancy wrapper around a dynamic library, that you would specify under General > Frameworks and Libraries. This framework would automatically be bundled with your app. If you have an Xcode workspace with both app and framework targets, then this is how it is all supposed to work.

You could also have a dynamic library. I think you could also specify this under General > Frameworks and Libraries. I've never used this option as it is problematic for many reasons.

Another option is to install your dynamic library and/or framework separately into ~/Library/Frameworks or /Library/Frameworks (or some other location) and specify all the correct settings so that your app can find it. Again, this is problematic for many reasons.
Linking error: Library not found
 
 
Q