Xcode 12.2 not linking for iOS 14.2

Due to this include,

#include <resolv.h>

We get the following linking error,

ld: warning: text-based stub file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/libresolv.tbd and library file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/libresolv.dylib are out of sync. Falling back to library file for linking.

ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/libresolv.dylib, missing required architecture i386 in file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/lib/libresolv.dylib (2 slices)

Undefined symbols for architecture i386:

  "res9ninit", referenced from:

      +[CCSDKDiagnostics isCurrentNetworkIPv6] in CCSDKDiagnostics.o

  "
res9getservers", referenced from:

      +[CCSDKDiagnostics isCurrentNetworkIPv6] in CCSDKDiagnostics.o

  "res9_ndestroy", referenced from:

      +[CCSDKDiagnostics isCurrentNetworkIPv6] in CCSDKDiagnostics.o

ld: symbol(s) not found for architecture i386


ld: symbol(s) not found for architecture i386

You are building for the simulator using the Intel 32-bit architecture, which is no longer supported. Check that all of the different architecture settings in your build settings are set to the default values so that you're building for a 64-bit architecture.
Thanks @edford! I set "Build Active Architecture Only" to YES, and the issue was solved.
Xcode 12.2 not linking for iOS 14.2
 
 
Q