Hacker News new | ask | show | jobs
by e4m 6242 days ago
Can anyone link statically in XCode? Why did Apple break static linking in ld?
1 comments

Sure. Just get rid of .dylib (dynamic library) and use .a (static library). The difficult part is that Xcode will automatically use the first found .dylib in PATH instead of .a, so to workaround you should put .a in PATH before .dylib, or just rename .a to something else (libcrypto.a -> libcrypto-my.a) and link with renamed library.