My Xcode target links against hdf5 library (using the Link Binary with Libraries build phase). libhdf5 is installed using MacPorts, thus /opt/local/lib contains both the dyn
Use the "-static" switch for linking: GCC link options