I'm currently trying to link a static C library I've created to a fresh Xcode project. To link it, I followed the following instructions:
1) Navigate to Build Phases
2) Expand Link Binaries With Library
3) Added an "other" library, and then specified the .a file in question.
Unfortunately, the project won't compile and throws the following error:
ld: library not found for -ltxht
In reaction to your comment on Eduard Wirch' answer: you can also control static linking for this one library only, if you replace -lhdf5 by -l/full/path/to/libhdf5.a
If this is an external static lib, you need to add the path it exists to
Library Search Paths under Build Settings. Not the full path, just the directory it is in.