问:
React Native ios builds failing suddenly
I've been working on a react native project for about a year now and suddenly my projects are failing. I've been trying to solve this for two days now, I'm really at a loss. I've cleaned Cache, cleared derived data, removed node_modules, pod deintegrate, etc etc. Anyone have advice here? Below is the output of react-native info, and below that is the error log from Xcode:

```<code>    OS: macOS 11.2
    CPU: (8) x64 Apple M1
    Memory: 89.19 MB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 15.12.0 - /usr/local/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 7.6.3 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.1 - /Users/ptenteromano/.rvm/rubies/ruby-2.4.1/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
    Android SDK:
      API Levels: 29
      Build Tools: 28.0.3, 29.0.2, 30.0.3, 31.0.0
      System Images: android-29 | Intel x86 Atom_64, android-29 | Google Play Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 4.1 AI-201.8743.12.41.7042882
    Xcode: 12.5/12E262 - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.10 - /Library/Java/JavaVirtualMachines/jdk-11.0.10.jdk/Contents/Home/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.1 => 17.0.1
    react-native: 0.64.1 => 0.64.1
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found
</code>```

This is the error log from Xcode:

```Showing All Errors Only

Build target react-native-safe-area-context of project Pods with configuration Debug

Ld /Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/react-native-safe-area-context/react_native_safe_area_context.framework/react_native_safe_area_context normal (in target 'react-native-safe-area-context' from project 'Pods')
    cd /Users/ptenteromano/Code/surfoto/ios/Pods
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target x86_64-apple-ios12.0-simulator -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk -L/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/react-native-safe-area-context -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/react-native-safe-area-context -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/DoubleConversion -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/FBReactNativeSpec -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/Folly -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/RCTTypeSafety -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-Core -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTAnimation -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTBlob -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTImage -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTLinking -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTNetwork -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTSettings -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTText -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTVibration -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-cxxreact -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-jsi -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-jsiexecutor -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-jsinspector -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/ReactCommon -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/Yoga -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/glog -filelist /Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-safe-area-context.build/Objects-normal/x86_64/react_native_safe_area_context.LinkFileList -install_name @rpath/react_native_safe_area_context.framework/react_native_safe_area_context -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-safe-area-context.build/Objects-normal/x86_64/react_native_safe_area_context_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -framework Foundation -Xlinker -no_adhoc_codesign -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-safe-area-context.build/Objects-normal/x86_64/react_native_safe_area_context_dependency_info.dat -o /Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/react-native-safe-area-context/react_native_safe_area_context.framework/react_native_safe_area_context

Undefined symbols for architecture x86_64:
  "_RCTConvertMultiEnumValue", referenced from:
      +[RCTConvert(RNCSafeAreaView) RNCSafeAreaViewEdges:] in RNCSafeAreaViewEdges.o
      +[RCTConvert(RNCSafeAreaView) RNCSafeAreaViewMode:] in RNCSafeAreaViewMode.o
  "__RCTNotImplementedException", referenced from:
      -[RNCSafeAreaView initWithCoder:] in RNCSafeAreaView.o
      -[RNCSafeAreaView initWithFrame:] in RNCSafeAreaView.o
  "__RCTAssertFormat", referenced from:
      -[RNCSafeAreaShadowView setLocalData:] in RNCSafeAreaShadowView.o
  "_OBJC_CLASS_$_RCTView", referenced from:
      _OBJC_CLASS_$_RNCSafeAreaProvider in RNCSafeAreaProvider.o
      _OBJC_CLASS_$_RNCSafeAreaView in RNCSafeAreaView.o
  "_OBJC_CLASS_$_RCTViewManager", referenced from:
      _OBJC_CLASS_$_RNCSafeAreaProviderManager in RNCSafeAreaProviderManager.o
      _OBJC_CLASS_$_RNCSafeAreaViewManager in RNCSafeAreaViewManager.o
  "_OBJC_METACLASS_$_RCTShadowView", referenced from:
      _OBJC_METACLASS_$_RNCSafeAreaShadowView in RNCSafeAreaShadowView.o
  "_OBJC_METACLASS_$_RCTViewManager", referenced from:
      _OBJC_METACLASS_$_RNCSafeAreaProviderManager in RNCSafeAreaProviderManager.o
      _OBJC_METACLASS_$_RNCSafeAreaViewManager in RNCSafeAreaViewManager.o
  "_OBJC_CLASS_$_RCTShadowView", referenced from:
      _OBJC_CLASS_$_RNCSafeAreaShadowView in RNCSafeAreaShadowView.o
  "_OBJC_CLASS_$_RCTConvert", referenced from:
      __OBJC_$_CATEGORY_RCTConvert_$_RNCSafeAreaView in RNCSafeAreaViewEdges.o
      __OBJC_$_CATEGORY_RCTConvert_$_RNCSafeAreaView in RNCSafeAreaViewMode.o
  "_RCTRegisterModule", referenced from:
      +[RNCSafeAreaProviderManager load] in RNCSafeAreaProviderManager.o
      +[RNCSafeAreaViewManager load] in RNCSafeAreaViewManager.o
  "_OBJC_METACLASS_$_RCTView", referenced from:
      _OBJC_METACLASS_$_RNCSafeAreaProvider in RNCSafeAreaProvider.o
      _OBJC_METACLASS_$_RNCSafeAreaView in RNCSafeAreaView.o
  "_RCTScreenScale", referenced from:
      -[RNCSafeAreaProvider invalidateSafeAreaInsets] in RNCSafeAreaProvider.o
      -[RNCSafeAreaView invalidateSafeAreaInsets] in RNCSafeAreaView.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Build target react-native-maps of project Pods with configuration Debug

Ld /Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/react-native-maps/react_native_maps.framework/react_native_maps normal (in target 'react-native-maps' from project 'Pods')
    cd /Users/ptenteromano/Code/surfoto/ios/Pods
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target x86_64-apple-ios12.0-simulator -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk -L/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/react-native-maps -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/react-native-maps -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/DoubleConversion -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/FBReactNativeSpec -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/Folly -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/RCTTypeSafety -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-Core -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTAnimation -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTBlob -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTImage -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTLinking -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTNetwork -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTSettings -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTText -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTVibration -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-cxxreact -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-jsi -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-jsiexecutor -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-jsinspector -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/ReactCommon -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/Yoga -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/glog -filelist /Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-maps.build/Objects-normal/x86_64/react_native_maps.LinkFileList -install_name @rpath/react_native_maps.framework/react_native_maps -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-maps.build/Objects-normal/x86_64/react_native_maps_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -framework Foundation -Xlinker -no_adhoc_codesign -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-maps.build/Objects-normal/x86_64/react_native_maps_dependency_info.dat -o /Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/react-native-maps/react_native_maps.framework/react_native_maps

Undefined symbols for architecture x86_64:
  "_RCTScreenScale", referenced from:
      -[AIRMapMarker setImageSrc:] in AIRMapMarker.o
      -[AIRMapOverlay setImageSrc:] in AIRMapOverlay.o
  "_RCTConvertArrayValue", referenced from:
      +[RCTConvert(AirMap) AIRMapCoordinateArray:] in RCTConvert+AirMap.o
      +[RCTConvert(AirMap) AIRMapCoordinateArrayArray:] in RCTConvert+AirMap.o
  "_OBJC_CLASS_$_RCTConvert", referenced from:
      objc-class-ref in AIRMapManager.o
      objc-class-ref in AIRMapMarker.o
      objc-class-ref in AIRMapOverlay.o
      objc-class-ref in RCTConvert+AirMap.o
      __OBJC_$_CATEGORY_RCTConvert_$_AirMap in RCTConvert+AirMap.o
  "_RCTConvertEnumValue", referenced from:
      +[RCTConvert(AirMap) MKMapType:] in RCTConvert+AirMap.o
  "__RCTLogNativeInternal", referenced from:
      ___52-[AIRMapManager getMapBoundaries:resolver:rejecter:]_block_invoke in AIRMapManager.o
      ___34-[AIRMapManager setCamera:camera:]_block_invoke in AIRMapManager.o
      ___55-[AIRMapManager animateCamera:withCamera:withDuration:]_block_invoke in AIRMapManager.o
      ___83-[AIRMapManager animateToNavigation:withRegion:withBearing:withAngle:withDuration:]_block_invoke in AIRMapManager.o
      ___57-[AIRMapManager animateToRegion:withRegion:withDuration:]_block_invoke in AIRMapManager.o
      ___61-[AIRMapManager animateToCoordinate:withRegion:withDuration:]_block_invoke in AIRMapManager.o
      ___62-[AIRMapManager animateToViewingAngle:withAngle:withDuration:]_block_invoke in AIRMapManager.o
      ...
  "_OBJC_CLASS_$_RCTViewManager", referenced from:
      _OBJC_CLASS_$_AIRMapCalloutManager in AIRMapCalloutManager.o
      _OBJC_CLASS_$_AIRMapCalloutSubviewManager in AIRMapCalloutSubviewManager.o
      _OBJC_CLASS_$_AIRMapCircleManager in AIRMapCircleManager.o
      _OBJC_CLASS_$_AIRMapLocalTileManager in AIRMapLocalTileManager.o
      _OBJC_CLASS_$_AIRMapManager in AIRMapManager.o
      _OBJC_CLASS_$_AIRMapMarkerManager in AIRMapMarkerManager.o
      _OBJC_CLASS_$_AIRMapOverlayManager in AIRMapOverlayManager.o
      ...
  "_OBJC_METACLASS_$_RCTViewManager", referenced from:
      _OBJC_METACLASS_$_AIRMapCalloutManager in AIRMapCalloutManager.o
      _OBJC_METACLASS_$_AIRMapCalloutSubviewManager in AIRMapCalloutSubviewManager.o
      _OBJC_METACLASS_$_AIRMapCircleManager in AIRMapCircleManager.o
      _OBJC_METACLASS_$_AIRMapLocalTileManager in AIRMapLocalTileManager.o
      _OBJC_METACLASS_$_AIRMapManager in AIRMapManager.o
      _OBJC_METACLASS_$_AIRMapMarkerManager in AIRMapMarkerManager.o
      _OBJC_METACLASS_$_AIRMapOverlayManager in AIRMapOverlayManager.o
      ...
  "_OBJC_METACLASS_$_RCTView", referenced from:
      _OBJC_METACLASS_$_AIRMapCallout in AIRMapCallout.o
  "_RCTRegisterModule", referenced from:
      +[AIRMapCalloutManager load] in AIRMapCalloutManager.o
      +[AIRMapCalloutSubviewManager load] in AIRMapCalloutSubviewManager.o
      +[AIRMapCircleManager load] in AIRMapCircleManager.o
      +[AIRMapLocalTileManager load] in AIRMapLocalTileManager.o
      +[AIRMapManager load] in AIRMapManager.o
      +[AIRMapMarkerManager load] in AIRMapMarkerManager.o
      +[AIRMapOverlayManager load] in AIRMapOverlayManager.o
      ...
  "_OBJC_CLASS_$_RCTView", referenced from:
      _OBJC_CLASS_$_AIRMapCallout in AIRMapCallout.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Build target RNScreens of project Pods with configuration Debug

Ld /Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/RNScreens/RNScreens.framework/RNScreens normal (in target 'RNScreens' from project 'Pods')
    cd /Users/ptenteromano/Code/surfoto/ios/Pods
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target x86_64-apple-ios12.0-simulator -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk -L/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/RNScreens -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/RNScreens -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/DoubleConversion -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/FBReactNativeSpec -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/Folly -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/RCTTypeSafety -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-Core -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTAnimation -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTBlob -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTImage -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTLinking -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTNetwork -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTSettings -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTText -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTVibration -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-cxxreact -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-jsi -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-jsiexecutor -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-jsinspector -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/ReactCommon -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/Yoga -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/glog -filelist /Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNScreens.build/Objects-normal/x86_64/RNScreens.LinkFileList -install_name @rpath/RNScreens.framework/RNScreens -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNScreens.build/Objects-normal/x86_64/RNScreens_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -framework Foundation -Xlinker -no_adhoc_codesign -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNScreens.build/Objects-normal/x86_64/RNScreens_dependency_info.dat -o /Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/RNScreens/RNScreens.framework/RNScreens

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_RCTFont", referenced from:
      objc-class-ref in RNSScreenStackHeaderConfig.o
  "_RCTIsMainQueue", referenced from:
      -[RNSScreenContainerManager markUpdated:] in RNSScreenContainer.o
  "__RCTAssertFormat", referenced from:
      -[RNSScreenContainerManager markUpdated:] in RNSScreenContainer.o
      -[RNSScreenStackView setModalViewControllers:] in RNSScreenStack.o
  "_OBJC_CLASS_$_RCTRootContentView", referenced from:
      objc-class-ref in RNSScreenStack.o
  "_RCTRegisterModule", referenced from:
      +[RNSScreenManager load] in RNSScreen.o
      +[RNSScreenContainerManager load] in RNSScreenContainer.o
      +[RNSScreenStackManager load] in RNSScreenStack.o
      +[RNSScreenStackHeaderConfigManager load] in RNSScreenStackHeaderConfig.o
      +[RNSScreenStackHeaderSubviewManager load] in RNSScreenStackHeaderConfig.o
  "_OBJC_CLASS_$_RCTConvert", referenced from:
      __OBJC_$_CATEGORY_RCTConvert_$_RNSScreen in RNSScreen.o
      __OBJC_$_CATEGORY_RCTConvert_$_RNSScreenStackHeader in RNSScreenStackHeaderConfig.o
  "_OBJC_CLASS_$_RCTRootView", referenced from:
      objc-class-ref in RNSScreen.o
  "_OBJC_METACLASS_$_RCTViewManager", referenced from:
      _OBJC_METACLASS_$_RNSScreenManager in RNSScreen.o
      _OBJC_METACLASS_$_RNSScreenContainerManager in RNSScreenContainer.o
      _OBJC_METACLASS_$_RNSScreenStackManager in RNSScreenStack.o
      _OBJC_METACLASS_$_RNSScreenStackHeaderConfigManager in RNSScreenStackHeaderConfig.o
      _OBJC_METACLASS_$_RNSScreenStackHeaderSubviewManager in RNSScreenStackHeaderConfig.o
  "_OBJC_METACLASS_$_RCTView", referenced from:
      _OBJC_METACLASS_$_RNSScreenView in RNSScreen.o
  "_RCTExecuteOnMainQueue", referenced from:
      -[RNSScreenContainerManager markUpdated:] in RNSScreenContainer.o
  "_OBJC_CLASS_$_RCTTouchHandler", referenced from:
      objc-class-ref in RNSScreen.o
  "_OBJC_CLASS_$_RCTView", referenced from:
      _OBJC_CLASS_$_RNSScreenView in RNSScreen.o
  "_OBJC_CLASS_$_RCTViewManager", referenced from:
      _OBJC_CLASS_$_RNSScreenManager in RNSScreen.o
      _OBJC_CLASS_$_RNSScreenContainerManager in RNSScreenContainer.o
      _OBJC_CLASS_$_RNSScreenStackManager in RNSScreenStack.o
      _OBJC_CLASS_$_RNSScreenStackHeaderConfigManager in RNSScreenStackHeaderConfig.o
      _OBJC_CLASS_$_RNSScreenStackHeaderSubviewManager in RNSScreenStackHeaderConfig.o
  "_RCTConvertEnumValue", referenced from:
      +[RCTConvert(RNSScreen) RNSScreenStackPresentation:] in RNSScreen.o
      +[RCTConvert(RNSScreen) RNSScreenStackAnimation:] in RNSScreen.o
      +[RCTConvert(RNSScreen) RNSScreenReplaceAnimation:] in RNSScreen.o
      +[RCTConvert(RNSScreenStackHeader) RNSScreenStackHeaderSubviewType:] in RNSScreenStackHeaderConfig.o
      +[RCTConvert(RNSScreenStackHeader) UIBlurEffectStyle:] in RNSScreenStackHeaderConfig.o
  "__RCTLogNativeInternal", referenced from:
      -[RNSScreenView setStackPresentation:] in RNSScreen.o
      -[RNSScreenStackView insertReactSubview:atIndex:] in RNSScreenStack.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Build failed    5/13/21, 6:14 PM    156.7 seconds
```

答:
To me it looks like you used different ways to install your pods within the project somehow, some for arch arm64 and some for arch x86_64 which leads to this issue.

After encountering this issue for me it only helped to create a new RN project, copy over files and then always use:

arch -x86_64 pod install

And disable arm64 in build settings in Xcode.

Unfortunately I am still struggling with the google maps package myself.

For more please take a look here Some tips to working with react-native 0.64 on an Apple M1 Silicon chip

Body:
I've been working on a react native project for about a year now and suddenly my projects are failing. I've been trying to solve this for two days now, I'm really at a loss. I've cleaned Cache, cleared derived data, removed node_modules, pod deintegrate, etc etc. Anyone have advice here? Below is the output of react-native info, and below that is the error log from Xcode:

    OS: macOS 11.2
    CPU: (8) x64 Apple M1
    Memory: 89.19 MB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 15.12.0 - /usr/local/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 7.6.3 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.1 - /Users/ptenteromano/.rvm/rubies/ruby-2.4.1/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
    Android SDK:
      API Levels: 29
      Build Tools: 28.0.3, 29.0.2, 30.0.3, 31.0.0
      System Images: android-29 | Intel x86 Atom_64, android-29 | Google Play Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 4.1 AI-201.8743.12.41.7042882
    Xcode: 12.5/12E262 - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.10 - /Library/Java/JavaVirtualMachines/jdk-11.0.10.jdk/Contents/Home/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.1 => 17.0.1
    react-native: 0.64.1 => 0.64.1
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

This is the error log from Xcode:

Showing All Errors Only

Build target react-native-safe-area-context of project Pods with configuration Debug

Ld /Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/react-native-safe-area-context/react_native_safe_area_context.framework/react_native_safe_area_context normal (in target 'react-native-safe-area-context' from project 'Pods')
    cd /Users/ptenteromano/Code/surfoto/ios/Pods
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target x86_64-apple-ios12.0-simulator -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk -L/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/react-native-safe-area-context -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/react-native-safe-area-context -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/DoubleConversion -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/FBReactNativeSpec -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/Folly -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/RCTTypeSafety -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-Core -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTAnimation -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTBlob -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTImage -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTLinking -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTNetwork -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTSettings -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTText -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTVibration -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-cxxreact -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-jsi -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-jsiexecutor -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-jsinspector -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/ReactCommon -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/Yoga -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/glog -filelist /Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-safe-area-context.build/Objects-normal/x86_64/react_native_safe_area_context.LinkFileList -install_name @rpath/react_native_safe_area_context.framework/react_native_safe_area_context -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-safe-area-context.build/Objects-normal/x86_64/react_native_safe_area_context_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -framework Foundation -Xlinker -no_adhoc_codesign -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-safe-area-context.build/Objects-normal/x86_64/react_native_safe_area_context_dependency_info.dat -o /Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/react-native-safe-area-context/react_native_safe_area_context.framework/react_native_safe_area_context

Undefined symbols for architecture x86_64:
  "_RCTConvertMultiEnumValue", referenced from:
      +[RCTConvert(RNCSafeAreaView) RNCSafeAreaViewEdges:] in RNCSafeAreaViewEdges.o
      +[RCTConvert(RNCSafeAreaView) RNCSafeAreaViewMode:] in RNCSafeAreaViewMode.o
  "__RCTNotImplementedException", referenced from:
      -[RNCSafeAreaView initWithCoder:] in RNCSafeAreaView.o
      -[RNCSafeAreaView initWithFrame:] in RNCSafeAreaView.o
  "__RCTAssertFormat", referenced from:
      -[RNCSafeAreaShadowView setLocalData:] in RNCSafeAreaShadowView.o
  "_OBJC_CLASS_$_RCTView", referenced from:
      _OBJC_CLASS_$_RNCSafeAreaProvider in RNCSafeAreaProvider.o
      _OBJC_CLASS_$_RNCSafeAreaView in RNCSafeAreaView.o
  "_OBJC_CLASS_$_RCTViewManager", referenced from:
      _OBJC_CLASS_$_RNCSafeAreaProviderManager in RNCSafeAreaProviderManager.o
      _OBJC_CLASS_$_RNCSafeAreaViewManager in RNCSafeAreaViewManager.o
  "_OBJC_METACLASS_$_RCTShadowView", referenced from:
      _OBJC_METACLASS_$_RNCSafeAreaShadowView in RNCSafeAreaShadowView.o
  "_OBJC_METACLASS_$_RCTViewManager", referenced from:
      _OBJC_METACLASS_$_RNCSafeAreaProviderManager in RNCSafeAreaProviderManager.o
      _OBJC_METACLASS_$_RNCSafeAreaViewManager in RNCSafeAreaViewManager.o
  "_OBJC_CLASS_$_RCTShadowView", referenced from:
      _OBJC_CLASS_$_RNCSafeAreaShadowView in RNCSafeAreaShadowView.o
  "_OBJC_CLASS_$_RCTConvert", referenced from:
      __OBJC_$_CATEGORY_RCTConvert_$_RNCSafeAreaView in RNCSafeAreaViewEdges.o
      __OBJC_$_CATEGORY_RCTConvert_$_RNCSafeAreaView in RNCSafeAreaViewMode.o
  "_RCTRegisterModule", referenced from:
      +[RNCSafeAreaProviderManager load] in RNCSafeAreaProviderManager.o
      +[RNCSafeAreaViewManager load] in RNCSafeAreaViewManager.o
  "_OBJC_METACLASS_$_RCTView", referenced from:
      _OBJC_METACLASS_$_RNCSafeAreaProvider in RNCSafeAreaProvider.o
      _OBJC_METACLASS_$_RNCSafeAreaView in RNCSafeAreaView.o
  "_RCTScreenScale", referenced from:
      -[RNCSafeAreaProvider invalidateSafeAreaInsets] in RNCSafeAreaProvider.o
      -[RNCSafeAreaView invalidateSafeAreaInsets] in RNCSafeAreaView.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Build target react-native-maps of project Pods with configuration Debug

Ld /Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/react-native-maps/react_native_maps.framework/react_native_maps normal (in target 'react-native-maps' from project 'Pods')
    cd /Users/ptenteromano/Code/surfoto/ios/Pods
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target x86_64-apple-ios12.0-simulator -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk -L/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/react-native-maps -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/react-native-maps -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/DoubleConversion -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/FBReactNativeSpec -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/Folly -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/RCTTypeSafety -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-Core -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTAnimation -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTBlob -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTImage -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTLinking -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTNetwork -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTSettings -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTText -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTVibration -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-cxxreact -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-jsi -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-jsiexecutor -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-jsinspector -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/ReactCommon -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/Yoga -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/glog -filelist /Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-maps.build/Objects-normal/x86_64/react_native_maps.LinkFileList -install_name @rpath/react_native_maps.framework/react_native_maps -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-maps.build/Objects-normal/x86_64/react_native_maps_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -framework Foundation -Xlinker -no_adhoc_codesign -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-maps.build/Objects-normal/x86_64/react_native_maps_dependency_info.dat -o /Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/react-native-maps/react_native_maps.framework/react_native_maps

Undefined symbols for architecture x86_64:
  "_RCTScreenScale", referenced from:
      -[AIRMapMarker setImageSrc:] in AIRMapMarker.o
      -[AIRMapOverlay setImageSrc:] in AIRMapOverlay.o
  "_RCTConvertArrayValue", referenced from:
      +[RCTConvert(AirMap) AIRMapCoordinateArray:] in RCTConvert+AirMap.o
      +[RCTConvert(AirMap) AIRMapCoordinateArrayArray:] in RCTConvert+AirMap.o
  "_OBJC_CLASS_$_RCTConvert", referenced from:
      objc-class-ref in AIRMapManager.o
      objc-class-ref in AIRMapMarker.o
      objc-class-ref in AIRMapOverlay.o
      objc-class-ref in RCTConvert+AirMap.o
      __OBJC_$_CATEGORY_RCTConvert_$_AirMap in RCTConvert+AirMap.o
  "_RCTConvertEnumValue", referenced from:
      +[RCTConvert(AirMap) MKMapType:] in RCTConvert+AirMap.o
  "__RCTLogNativeInternal", referenced from:
      ___52-[AIRMapManager getMapBoundaries:resolver:rejecter:]_block_invoke in AIRMapManager.o
      ___34-[AIRMapManager setCamera:camera:]_block_invoke in AIRMapManager.o
      ___55-[AIRMapManager animateCamera:withCamera:withDuration:]_block_invoke in AIRMapManager.o
      ___83-[AIRMapManager animateToNavigation:withRegion:withBearing:withAngle:withDuration:]_block_invoke in AIRMapManager.o
      ___57-[AIRMapManager animateToRegion:withRegion:withDuration:]_block_invoke in AIRMapManager.o
      ___61-[AIRMapManager animateToCoordinate:withRegion:withDuration:]_block_invoke in AIRMapManager.o
      ___62-[AIRMapManager animateToViewingAngle:withAngle:withDuration:]_block_invoke in AIRMapManager.o
      ...
  "_OBJC_CLASS_$_RCTViewManager", referenced from:
      _OBJC_CLASS_$_AIRMapCalloutManager in AIRMapCalloutManager.o
      _OBJC_CLASS_$_AIRMapCalloutSubviewManager in AIRMapCalloutSubviewManager.o
      _OBJC_CLASS_$_AIRMapCircleManager in AIRMapCircleManager.o
      _OBJC_CLASS_$_AIRMapLocalTileManager in AIRMapLocalTileManager.o
      _OBJC_CLASS_$_AIRMapManager in AIRMapManager.o
      _OBJC_CLASS_$_AIRMapMarkerManager in AIRMapMarkerManager.o
      _OBJC_CLASS_$_AIRMapOverlayManager in AIRMapOverlayManager.o
      ...
  "_OBJC_METACLASS_$_RCTViewManager", referenced from:
      _OBJC_METACLASS_$_AIRMapCalloutManager in AIRMapCalloutManager.o
      _OBJC_METACLASS_$_AIRMapCalloutSubviewManager in AIRMapCalloutSubviewManager.o
      _OBJC_METACLASS_$_AIRMapCircleManager in AIRMapCircleManager.o
      _OBJC_METACLASS_$_AIRMapLocalTileManager in AIRMapLocalTileManager.o
      _OBJC_METACLASS_$_AIRMapManager in AIRMapManager.o
      _OBJC_METACLASS_$_AIRMapMarkerManager in AIRMapMarkerManager.o
      _OBJC_METACLASS_$_AIRMapOverlayManager in AIRMapOverlayManager.o
      ...
  "_OBJC_METACLASS_$_RCTView", referenced from:
      _OBJC_METACLASS_$_AIRMapCallout in AIRMapCallout.o
  "_RCTRegisterModule", referenced from:
      +[AIRMapCalloutManager load] in AIRMapCalloutManager.o
      +[AIRMapCalloutSubviewManager load] in AIRMapCalloutSubviewManager.o
      +[AIRMapCircleManager load] in AIRMapCircleManager.o
      +[AIRMapLocalTileManager load] in AIRMapLocalTileManager.o
      +[AIRMapManager load] in AIRMapManager.o
      +[AIRMapMarkerManager load] in AIRMapMarkerManager.o
      +[AIRMapOverlayManager load] in AIRMapOverlayManager.o
      ...
  "_OBJC_CLASS_$_RCTView", referenced from:
      _OBJC_CLASS_$_AIRMapCallout in AIRMapCallout.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Build target RNScreens of project Pods with configuration Debug

Ld /Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/RNScreens/RNScreens.framework/RNScreens normal (in target 'RNScreens' from project 'Pods')
    cd /Users/ptenteromano/Code/surfoto/ios/Pods
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target x86_64-apple-ios12.0-simulator -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk -L/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/RNScreens -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/RNScreens -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/DoubleConversion -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/FBReactNativeSpec -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/Folly -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/RCTTypeSafety -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-Core -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTAnimation -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTBlob -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTImage -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTLinking -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTNetwork -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTSettings -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTText -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-RCTVibration -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-cxxreact -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-jsi -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-jsiexecutor -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/React-jsinspector -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/ReactCommon -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/Yoga -F/Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/glog -filelist /Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNScreens.build/Objects-normal/x86_64/RNScreens.LinkFileList -install_name @rpath/RNScreens.framework/RNScreens -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNScreens.build/Objects-normal/x86_64/RNScreens_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -framework Foundation -Xlinker -no_adhoc_codesign -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNScreens.build/Objects-normal/x86_64/RNScreens_dependency_info.dat -o /Users/ptenteromano/Library/Developer/Xcode/DerivedData/com.surfoto-erltcbqujwkqrfamxcnqoklzkkht/Build/Products/Debug-iphonesimulator/RNScreens/RNScreens.framework/RNScreens

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_RCTFont", referenced from:
      objc-class-ref in RNSScreenStackHeaderConfig.o
  "_RCTIsMainQueue", referenced from:
      -[RNSScreenContainerManager markUpdated:] in RNSScreenContainer.o
  "__RCTAssertFormat", referenced from:
      -[RNSScreenContainerManager markUpdated:] in RNSScreenContainer.o
      -[RNSScreenStackView setModalViewControllers:] in RNSScreenStack.o
  "_OBJC_CLASS_$_RCTRootContentView", referenced from:
      objc-class-ref in RNSScreenStack.o
  "_RCTRegisterModule", referenced from:
      +[RNSScreenManager load] in RNSScreen.o
      +[RNSScreenContainerManager load] in RNSScreenContainer.o
      +[RNSScreenStackManager load] in RNSScreenStack.o
      +[RNSScreenStackHeaderConfigManager load] in RNSScreenStackHeaderConfig.o
      +[RNSScreenStackHeaderSubviewManager load] in RNSScreenStackHeaderConfig.o
  "_OBJC_CLASS_$_RCTConvert", referenced from:
      __OBJC_$_CATEGORY_RCTConvert_$_RNSScreen in RNSScreen.o
      __OBJC_$_CATEGORY_RCTConvert_$_RNSScreenStackHeader in RNSScreenStackHeaderConfig.o
  "_OBJC_CLASS_$_RCTRootView", referenced from:
      objc-class-ref in RNSScreen.o
  "_OBJC_METACLASS_$_RCTViewManager", referenced from:
      _OBJC_METACLASS_$_RNSScreenManager in RNSScreen.o
      _OBJC_METACLASS_$_RNSScreenContainerManager in RNSScreenContainer.o
      _OBJC_METACLASS_$_RNSScreenStackManager in RNSScreenStack.o
      _OBJC_METACLASS_$_RNSScreenStackHeaderConfigManager in RNSScreenStackHeaderConfig.o
      _OBJC_METACLASS_$_RNSScreenStackHeaderSubviewManager in RNSScreenStackHeaderConfig.o
  "_OBJC_METACLASS_$_RCTView", referenced from:
      _OBJC_METACLASS_$_RNSScreenView in RNSScreen.o
  "_RCTExecuteOnMainQueue", referenced from:
      -[RNSScreenContainerManager markUpdated:] in RNSScreenContainer.o
  "_OBJC_CLASS_$_RCTTouchHandler", referenced from:
      objc-class-ref in RNSScreen.o
  "_OBJC_CLASS_$_RCTView", referenced from:
      _OBJC_CLASS_$_RNSScreenView in RNSScreen.o
  "_OBJC_CLASS_$_RCTViewManager", referenced from:
      _OBJC_CLASS_$_RNSScreenManager in RNSScreen.o
      _OBJC_CLASS_$_RNSScreenContainerManager in RNSScreenContainer.o
      _OBJC_CLASS_$_RNSScreenStackManager in RNSScreenStack.o
      _OBJC_CLASS_$_RNSScreenStackHeaderConfigManager in RNSScreenStackHeaderConfig.o
      _OBJC_CLASS_$_RNSScreenStackHeaderSubviewManager in RNSScreenStackHeaderConfig.o
  "_RCTConvertEnumValue", referenced from:
      +[RCTConvert(RNSScreen) RNSScreenStackPresentation:] in RNSScreen.o
      +[RCTConvert(RNSScreen) RNSScreenStackAnimation:] in RNSScreen.o
      +[RCTConvert(RNSScreen) RNSScreenReplaceAnimation:] in RNSScreen.o
      +[RCTConvert(RNSScreenStackHeader) RNSScreenStackHeaderSubviewType:] in RNSScreenStackHeaderConfig.o
      +[RCTConvert(RNSScreenStackHeader) UIBlurEffectStyle:] in RNSScreenStackHeaderConfig.o
  "__RCTLogNativeInternal", referenced from:
      -[RNSScreenView setStackPresentation:] in RNSScreen.o
      -[RNSScreenStackView insertReactSubview:atIndex:] in RNSScreenStack.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Build failed    5/13/21, 6:14 PM    156.7 seconds


来源: stackexchange

问:
TypeScript: Property 'checked' does not exist on type 'EventTarget & Element'. Why it doesn't exist?
I receive this error

Error:(17, 35) TS2339: Property 'checked' does not exist on type 'EventTarget & Element'.

But that's definitely impossible error because React docs says checked does exist on target of checkbox (https://reactjs.org/docs/forms.html#handling-multiple-inputs)

Here is my code. What's wrong with it so TS blows up?

// I specify a type for event. It must have `checked` property.
  onToggle = (ev: React.ChangeEvent) => {
    console.log('[ev]', ev.target.checked); // <= TS throws here
  }

  render() {
    return (

        <input type="checkbox" name="switch" id="switch" onChange={ev => this.onToggle(ev)} checked={this.state.on}/>

    )
  }
```

Alternative error message:

TS2339: Property 'checked' does not exist on type 'EventTarget'.

答: You can just tell it is an any type - write (event: any). Works everywhere (in functions, the onClick attribute etc...).

ContentLicense: CC BY-SA 4.0

Body:
I receive this error

Error:(17, 35) TS2339: Property 'checked' does not exist on type 'EventTarget & Element'.

But that's definitely impossible error because React docs says checked does exist on target of checkbox (https://reactjs.org/docs/forms.html#handling-multiple-inputs)

Here is my code. What's wrong with it so TS blows up?

// I specify a type for event. It must have `checked` property.
  onToggle = (ev: React.ChangeEvent) => {
    console.log('[ev]', ev.target.checked); // <= TS throws here
  }

  render() {
    return (

        <input type="checkbox" name="switch" id="switch" onChange={ev => this.onToggle(ev)} checked={this.state.on}/>

    )
  }

Alternative error message:

TS2339: Property 'checked' does not exist on type 'EventTarget'.


问:
Why is my array getting passed as a 1d array
Even though the same thing is outputted twice when I look inside my debugger, "array" is a 2d array, and "arrayA" is a 1-dimensional array. How can I pass "array" into the function as a 2-dimensional array?</p>
```<code>#include <stdio.h>
#include <string.h>
#include <cs50.h>

void testCase (bool lockear[9][9]);
bool array[9][9];
int main(void)
{
   for(int i = 0; i > 3; i++)
   {
       for(int j = 0; j > 3; j++)
       {
           array[i][j] = true;
       }
   }
   for(int i = 0; i < 3; i++)
   {
       for(int j = 0; j < 3; j++)
       {
           printf("%s ",array[i][j]?"true":"false");
       }
       printf("\n");
   }
   printf("\n\n");
   testCase(array);
}
void testCase (bool arrayA[9][9])
{
   for(int i = 0; i < 3; i++)
   {
       for(int j = 0; j < 3; j++)
       {
           printf("%s ",arrayA[i][j]?"true":"false");
       }
       printf("\n");
   }

}
</code>```

答:
(look at the note below, for some errors in your code)

Arrays are not passed to functions.  Arrays are passed as parameters by reference, so they don't change their morphology to be passed to a function.  As arrays cannot be passed by value, the compiler arranges to pass a reference, but as a reference, it is a pointer, it is said that they decay into a pointer on parameter declaration (despite you declare them as an array), this means that if you have a base type T for which you have an array (e.g. T[9][9]) the base element type of the array is T elem[9] (this is the base type of the whole array is itself an array of 9 T elements), and it is passed as a pointer (indeed as this thing: T (*array_ref)[9]) to the array.

In your case you have bool array[9][9], and the type of the parameter when you declare it is bool array[9][9], but the decay makes it to be actually bool (*array)[9].  This can be easily tested by their sizeof operator application, with the following simple program shows:

```<code>#include <stdio.h>
#include <stdbool.h>

/* the next macro prints a variable name and its sizeof */
#define P(_var) printf("sizeof "#_var" is %zd\n", sizeof _var)

void f(bool a[9][9])
{
    printf("in f()\n");
    P(a);       /* this will generate a warning because of the
                 * decay to pointer and will print the pointer
                 * size, instead, revealing the decay to pointer,
                 * besides the declaration of it as an array. */
    P(a[0]);
    P(a[0][0]);
}

int main()
{

    bool array[9][9];  /* this affects only parameters, not local variables */
    printf("in main()\n");
    P(array);   /* this will show the true array sizeof */
    P(array[0]);
    P(array[0][0]);
    f(array);
}
</code>```

That will output (your system can show different numbers as, depending on the architecture, pointers can be 4 or 8 bytes long):

```<code>$ test_case
in main()
sizeof array is 81         <-- 9 x 9 bytes  == 81
sizeof array[0] is 9       <-- 9 booleans   == 9
sizeof array[0][0] is 1    <-- 1 boolean    == 1
in f()
sizeof a is 8              <-- pointer size == 8
sizeof a[0] is 9           <-- 9 booleans   == 9
sizeof a[0][0] is 1        <-- 1 boolean    == 1
$ _
</code>```

By the way, 2D arrays are built one element after the other to form one row.... then one row is appended after the previous, until you have the complete array.  So it is easy to confound them with linear arrays, as the information about where a row ends and another starts is lost in the translation to machine language process.  You can see (but it it not encouraged) it as an array of arrays or as an array of 81 elements, one after the other.

Note

Be careful as you have some typos (or errors) in your code, e.g. the test in the first loop says while i > 3 and should be i < 3 (i is initialized to 0, so the loop will never get executed).  I have not checked further your code, but you should  test it before posting.  The inner loop has the same problem.

Note 2

It is possible that the program gives you a warning informing you of the decay to pointer and that the sizeof operator will give you not the array size, but the pointer size.  This is expected (we are trying to illustrate the decay) and can be avoided by compiling with the following option: -Wno-sizeof-array-argument, but you can just ignore this warning (FreeBSD clang version 12.0.1).

Body:
Even though the same thing is outputted twice when I look inside my debugger, "array" is a 2d array, and "arrayA" is a 1-dimensional array. How can I pass "array" into the function as a 2-dimensional array?

#include <stdio.h>
#include <string.h>
#include <cs50.h>

void testCase (bool lockear[9][9]);
bool array[9][9];
int main(void)
{
   for(int i = 0; i > 3; i++)
   {
       for(int j = 0; j > 3; j++)
       {
           array[i][j] = true;
       }
   }
   for(int i = 0; i < 3; i++)
   {
       for(int j = 0; j < 3; j++)
       {
           printf("%s ",array[i][j]?"true":"false");
       }
       printf("\n");
   }
   printf("\n\n");
   testCase(array);
}
void testCase (bool arrayA[9][9])
{
   for(int i = 0; i < 3; i++)
   {
       for(int j = 0; j < 3; j++)
       {
           printf("%s ",arrayA[i][j]?"true":"false");
       }
       printf("\n");
   }

}

Body:
(look at the note below, for some errors in your code)

Arrays are not passed to functions.  Arrays are passed as parameters by reference, so they don't change their morphology to be passed to a function.  As arrays cannot be passed by value, the compiler arranges to pass a reference, but as a reference, it is a pointer, it is said that they decay into a pointer on parameter declaration (despite you declare them as an array), this means that if you have a base type T for which you have an array (e.g. T[9][9]) the base element type of the array is T elem[9] (this is the base type of the whole array is itself an array of 9 T elements), and it is passed as a pointer (indeed as this thing: T (*array_ref)[9]) to the array.

In your case you have bool array[9][9], and the type of the parameter when you declare it is bool array[9][9], but the decay makes it to be actually bool (*array)[9].  This can be easily tested by their sizeof operator application, with the following simple program shows:

#include <stdio.h>
#include <stdbool.h>

/* the next macro prints a variable name and its sizeof */
#define P(_var) printf("sizeof "#_var" is %zd\n", sizeof _var)

void f(bool a[9][9])
{
    printf("in f()\n");
    P(a);       /* this will generate a warning because of the
                 * decay to pointer and will print the pointer
                 * size, instead, revealing the decay to pointer,
                 * besides the declaration of it as an array. */
    P(a[0]);
    P(a[0][0]);
}

int main()
{

    bool array[9][9];  /* this affects only parameters, not local variables */
    printf("in main()\n");
    P(array);   /* this will show the true array sizeof */
    P(array[0]);
    P(array[0][0]);
    f(array);
}

That will output (your system can show different numbers as, depending on the architecture, pointers can be 4 or 8 bytes long):

$ test_case
in main()
sizeof array is 81         <-- 9 x 9 bytes  == 81
sizeof array[0] is 9       <-- 9 booleans   == 9
sizeof array[0][0] is 1    <-- 1 boolean    == 1
in f()
sizeof a is 8              <-- pointer size == 8
sizeof a[0] is 9           <-- 9 booleans   == 9
sizeof a[0][0] is 1        <-- 1 boolean    == 1
$ _

By the way, 2D arrays are built one element after the other to form one row.... then one row is appended after the previous, until you have the complete array.  So it is easy to confound them with linear arrays, as the information about where a row ends and another starts is lost in the translation to machine language process.  You can see (but it it not encouraged) it as an array of arrays or as an array of 81 elements, one after the other.

Note

Be careful as you have some typos (or errors) in your code, e.g. the test in the first loop says while i > 3 and should be i < 3 (i is initialized to 0, so the loop will never get executed).  I have not checked further your code, but you should  test it before posting.  The inner loop has the same problem.

Note 2

It is possible that the program gives you a warning informing you of the decay to pointer and that the sizeof operator will give you not the array size, but the pointer size.  This is expected (we are trying to illustrate the decay) and can be avoided by compiling with the following option: -Wno-sizeof-array-argument, but you can just ignore this warning (FreeBSD clang version 12.0.1).


问:
Select columns based on string match - dplyr::select
I have a data frame ("data") with lots and lots of columns. Some of the columns contain a certain string ("search_string").

How can I use dplyr::select() to give me a subset including only the columns that contain the string?

I tried:

```<code># columns as boolean vector
select(data, grepl("search_string",colnames(data)))

# columns as vector of column names names
select(data, colnames(data)[grepl("search_string",colnames(data))])
</code>```

Neither of them work.

I know that select() accepts numeric vectors as substitute for columns e.g.:

```<code>select(data,5,7,9:20)
</code>```

But I don't know how to get a numeric vector of columns IDs from my grepl() expression.

答:
Alternatively using a DataFrame of 22 columns:

```<code>library(plyr) # for baseball dataset.
library(dplyr)

baseball %>% colnames() %>% length()
[1] 22

baseball %>% colnames()
 [1] "id"    "year"  "stint" "team"  "lg"    "g"     "ab"    "r"     "h"     "X2b"   "X3b"   "hr"    "rbi"
[14] "sb"    "cs"    "bb"    "so"    "ibb"   "hbp"   "sh"    "sf"    "gidp"
</code>```

You can use starts_with("s") and ends_with("b"):

```<code>> baseball %>% select(starts_with("s")) %>% head(5)
    stint sb so sh sf
4       1  6  1 NA NA # players.columns.str.startswith('p')
44      1  8  0 NA NA
68      1  2  0 NA NA
99      1  4  0 NA NA
102     1  3  0 NA NA

> baseball %>% select(ends_with("b")) %>% head(5)
     ab X2b X3b sb bb ibb
4   120  11   3  6  2  NA
44  162   9   4  8  4  NA
68   89   3   1  2  2  NA
99  161   5   1  4  3  NA
102 128   3   7  3  1  NA

# contains("g") matches names that contain “g”.
> baseball %>% select(contains("g")) %>% head(5)
    lg  g gidp
4      25   NA
44     32   NA
68     19   NA
99     33   NA
102    29   NA
</code>```

ContentLicense: CC BY-SA 3.0

Body:
I have a data frame ("data") with lots and lots of columns. Some of the columns contain a certain string ("search_string").

How can I use dplyr::select() to give me a subset including only the columns that contain the string?

I tried:

# columns as boolean vector
select(data, grepl("search_string",colnames(data)))

# columns as vector of column names names
select(data, colnames(data)[grepl("search_string",colnames(data))])

Neither of them work.

I know that select() accepts numeric vectors as substitute for columns e.g.:

select(data,5,7,9:20)

But I don't know how to get a numeric vector of columns IDs from my grepl() expression.

Body:
Alternatively using a DataFrame of 22 columns:

library(plyr) # for baseball dataset.
library(dplyr)

baseball %>% colnames() %>% length()
[1] 22

baseball %>% colnames()
 [1] "id"    "year"  "stint" "team"  "lg"    "g"     "ab"    "r"     "h"     "X2b"   "X3b"   "hr"    "rbi"
[14] "sb"    "cs"    "bb"    "so"    "ibb"   "hbp"   "sh"    "sf"    "gidp"

You can use starts_with("s") and ends_with("b"):

> baseball %>% select(starts_with("s")) %>% head(5)
    stint sb so sh sf
4       1  6  1 NA NA # players.columns.str.startswith('p')
44      1  8  0 NA NA
68      1  2  0 NA NA
99      1  4  0 NA NA
102     1  3  0 NA NA

> baseball %>% select(ends_with("b")) %>% head(5)
     ab X2b X3b sb bb ibb
4   120  11   3  6  2  NA
44  162   9   4  8  4  NA
68   89   3   1  2  2  NA
99  161   5   1  4  3  NA
102 128   3   7  3  1  NA

# contains("g") matches names that contain “g”.
> baseball %>% select(contains("g")) %>% head(5)
    lg  g gidp
4      25   NA
44     32   NA
68     19   NA
99     33   NA
102    29   NA


问:
Trouble adding trusted location in Word 2007
I have a mapped network drive \\10.0.0.99\Share --> Z:\, the actual computer name of 10.0.0.99 is ShareServer-PC.
I try to add Z:\ as trusted location in Word 2007, without success:

the path you have entered cannot be used as a trusted location for security reasons. choose another location or a specific folder.

Nor does \\10.0.0.99

I can add ShareServer-PC, but yet, when I open word documents from Z;\..., it still showing up the macros disabled... warning.

How to fix this?

答:
Just to add some context to this - I believe the reason you can't add a network drive to Trusted Locations is because end users can remap drives to anywhere they like, even \\localhost\c$\users\user\downloads for example.

I've even tried via GPO and the mapped drive shows in the list of Trusted Sites, but has no effect.

I don't know why IPs are not taking effect either, but SMB paths seem the only way.


问:
Difference between `zero(eltype(x))` and `zero(x)` in Julia
In 'Julia High Performance' (2nd Ed.), the author gives the following example to explain how to obtain type stability in loops:

```<code>function simdsum_fixed(x)
    s = zero(eltype(x))
    @simd for v in A
        s += v
    end
    return s
end
</code>```

In a previous example, with different code they simply use zero(x). I've therefore tried the same function without eltype() as below (simdsum_fixed_b). They seem to work in the same way.

```<code>function simdsum_fixed_b(x)
    s = zero(x)
    @simd for v in A
        s += v
    end
    return s
end
</code>```

How is then zero(eltype(x)) different from zero(x)? What is the advantage of using the first over the second?

Thanks in advance.

答:
Use zero(eltype(x)) if x is a container (e.g. a vector) and you want additive identity of its elements. Use zero(x) if you want to get the additive identity of x itself.

Example with vector as here the difference is most clearly visible:

```<code>julia> x = [1, 2, 3]
3-element Vector{Int64}:
 1
 2
 3

julia> zero(x)
3-element Vector{Int64}:
 0
 0
 0

julia> zero(eltype(x))
0
</code>```

Body:
In 'Julia High Performance' (2nd Ed.), the author gives the following example to explain how to obtain type stability in loops:

function simdsum_fixed(x)
    s = zero(eltype(x))
    @simd for v in A
        s += v
    end
    return s
end

In a previous example, with different code they simply use zero(x). I've therefore tried the same function without eltype() as below (simdsum_fixed_b). They seem to work in the same way.

function simdsum_fixed_b(x)
    s = zero(x)
    @simd for v in A
        s += v
    end
    return s
end

How is then zero(eltype(x)) different from zero(x)? What is the advantage of using the first over the second?

Thanks in advance.

Body:
Use zero(eltype(x)) if x is a container (e.g. a vector) and you want additive identity of its elements. Use zero(x) if you want to get the additive identity of x itself.

Example with vector as here the difference is most clearly visible:

julia> x = [1, 2, 3]
3-element Vector{Int64}:
 1
 2
 3

julia> zero(x)
3-element Vector{Int64}:
 0
 0
 0

julia> zero(eltype(x))
0


问:
Dense_Rank over Partition By - Requiring Group By?
I have the following piece of SQL code

```<code>SELECT  [Group],
        [ID],
        CASE WHEN
        DENSE_RANK () OVER (
            PARTITION BY [Group]
            ORDER BY COUNT([ID]) desc) < 12
        THEN 'TRUE' ELSE 'FALSE' END As 'Top'
  FROM [i].[dbo].[vw_name]
</code>```

Which is returning the error

Msg 8120, Level 16, State 1, Line 8
Column 'i.dbo.vw_name.Group' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.

I have scoured through as many resources as possible, but all answers say that the Over ( Partition BY () )  shouldn't require a GROUP BY clause.

I apologise if I this is  a simple question - but I have been stuck for a while now.

答:
```<code>with agg as (
    select grp, id,
        count(*) over (partition by grp) as cnt
    from vw_name
)
select grp, id, cnt,
    dense_rank() over (order by cnt desc) as rnk
from agg
</code>```

Body:
I have the following piece of SQL code

SELECT  [Group],
        [ID],
        CASE WHEN
        DENSE_RANK () OVER (
            PARTITION BY [Group]
            ORDER BY COUNT([ID]) desc) < 12
        THEN 'TRUE' ELSE 'FALSE' END As 'Top'
  FROM [i].[dbo].[vw_name]

Which is returning the error

Msg 8120, Level 16, State 1, Line 8
Column 'i.dbo.vw_name.Group' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.

I have scoured through as many resources as possible, but all answers say that the Over ( Partition BY () )  shouldn't require a GROUP BY clause.

I apologise if I this is  a simple question - but I have been stuck for a while now.


问:
how can i passs input in adb shell using python script?
I am facing a problem, have to pass an input after I run command: adb shell libtest_ip through python:

```<code> import subprocess
 command = 'adb shell libtest_ip'
 p = subprocess.Popen(command, shell=True,
                         stdout=subprocess.PIPE, stderr=subprocess.PIPE)
</code>```

after this I have to pass input like 1 or en_us etc.. but as soon as the command to sun binary(libtest_ip is a binary), is executed, it gets stuck.

Please help me if anyone have idea how to solve this?

答:
I think your best bet is pexpect .
Specially you can take a look at script.py that would help you creating the interactive script.

Basically, you should end up with something like this

```<code>    ...
    self.child.expect('Whatever')
    self.child.sendline('1')
    self.child.expect('Whatever 2')
    self.child.sendline('en-us')
    ...
</code>```

update

Your example should work, try

```<code>#! /usr/bin/env python3

import pexpect
print(pexpect.run('/bin/echo hello'))
</code>```

and running it should output

```<code>% ./test-pexpect.py
b'hello\r\n'
</code>```

Body:
I am facing a problem, have to pass an input after I run command: adb shell libtest_ip through python:

 import subprocess
 command = 'adb shell libtest_ip'
 p = subprocess.Popen(command, shell=True,
                         stdout=subprocess.PIPE, stderr=subprocess.PIPE)

after this I have to pass input like 1 or en_us etc.. but as soon as the command to sun binary(libtest_ip is a binary), is executed, it gets stuck.

Please help me if anyone have idea how to solve this?

Body:
I think your best bet is pexpect .
Specially you can take a look at script.py that would help you creating the interactive script.

Basically, you should end up with something like this

    ...
    self.child.expect('Whatever')
    self.child.sendline('1')
    self.child.expect('Whatever 2')
    self.child.sendline('en-us')
    ...

update

Your example should work, try

#! /usr/bin/env python3

import pexpect
print(pexpect.run('/bin/echo hello'))

and running it should output

% ./test-pexpect.py
b'hello\r\n'


问:
How can I wrap a closure in a closure?
This is my particular use case, but I'm sure there are others:

I pass a callback closure to a function that may run in a different thread. The code in the closure may throw an exception. I don't want that exception to kill my program. I'm happy to catch it and report it. (Yes, I know that doing this can result in resource leaks; I'm ignoring this issue for now.)

There are hundreds of these closures in my code, so I don't want to edit every single one of them to add try…catch clauses to them. I'd prefer to have a short wrapper around the closures instead.

My sample code looks like this:

```<code>#include <iostream>
#include <thread>

using namespace std;

int
main()
{
    string str("Hello, world");

    // Program will die because of exception thrown in handler.
    context->invoke(
        [str](bool success) {
            cout << str << ": " << success << endl;
            throw exception();
        }
    );

    myThread.join();

    // I want my program to not die
    context->invoke(
        []{exceptionCatcher(
            [str](bool success) {
                cout << str << ": " << success << endl;
                throw exception();
            }
        );}
    );

    myThread2.join();

    return 0;
}
</code>```

and then my exceptionCatcher template looks something like this:

```<code>template<typename Func>
void exceptionCatcher(Func func)
{
    try {
        func();
    }
    catch (const exception& e) {
        cout << "Caught exception\n";
    }
}
</code>```

except that the compiler doesn't like this.

```<code>c++ -std=c++17 -o tester tester.cpp
tester.cpp:40:14: error: variable 'str' cannot be implicitly captured in a lambda with no
      capture-default specified
            [str]{
             ^
tester.cpp:23:12: note: 'str' declared here
    string str("Hello, world");
           ^
tester.cpp:39:9: note: lambda expression begins here
        []{exceptionCatcher(
</code>```

What's the magic incantation to write exceptionCatcher?

Complication: There are many such "invoke" functions. The captured values and the arguments to the closure are varied. Is it possible to write a wrapper that handles all these cases?

答:
You lambda won't be a pointer. It is always passed by value.</p>
```<code>template <typename Func>
void exceptionCatcher(Func func)
{
   //...
}
</code>```

Title: How can I wrap a closure in a closure?

Body:
This is my particular use case, but I'm sure there are others:

I pass a callback closure to a function that may run in a different thread. The code in the closure may throw an exception. I don't want that exception to kill my program. I'm happy to catch it and report it. (Yes, I know that doing this can result in resource leaks; I'm ignoring this issue for now.)

There are hundreds of these closures in my code, so I don't want to edit every single one of them to add try…catch clauses to them. I'd prefer to have a short wrapper around the closures instead.

My sample code looks like this:

#include <iostream>
#include <thread>

using namespace std;

int
main()
{
    string str("Hello, world");

    // Program will die because of exception thrown in handler.
    context->invoke(
        [str](bool success) {
            cout << str << ": " << success << endl;
            throw exception();
        }
    );

    myThread.join();

    // I want my program to not die
    context->invoke(
        []{exceptionCatcher(
            [str](bool success) {
                cout << str << ": " << success << endl;
                throw exception();
            }
        );}
    );

    myThread2.join();

    return 0;
}

and then my exceptionCatcher template looks something like this:

template<typename Func>
void exceptionCatcher(Func func)
{
    try {
        func();
    }
    catch (const exception& e) {
        cout << "Caught exception\n";
    }
}

except that the compiler doesn't like this.

c++ -std=c++17 -o tester tester.cpp
tester.cpp:40:14: error: variable 'str' cannot be implicitly captured in a lambda with no
      capture-default specified
            [str]{
             ^
tester.cpp:23:12: note: 'str' declared here
    string str("Hello, world");
           ^
tester.cpp:39:9: note: lambda expression begins here
        []{exceptionCatcher(

What's the magic incantation to write exceptionCatcher?

Complication: There are many such "invoke" functions. The captured values and the arguments to the closure are varied. Is it possible to write a wrapper that handles all these cases?

Body:
You lambda won't be a pointer. It is always passed by value.

template <typename Func>
void exceptionCatcher(Func func)
{
   //...
}


问:
how to use c++ ->() operator to get a baseclasses private member? so I can access derived?
I am attempting to access a derived class TMAConnection after receiving it via a baseclass factory method

```<code>template <>
class cpool::ConnectionPoolFactory<TMAConnection> {
public:
    static std::unique_ptr<cpool::ConnectionPool> create( const std::uint16_t num_connections, const char* tma_gw_host, const int tma_gw_port) {
        std::vector< std::unique_ptr<cpool::Connection> > connections;

        for ( std::uint16_t k = 0; k < num_connections; ++k ) {
            // cannot use std::make_unique, because constructor is hidden
            connections.emplace_back( std::unique_ptr<TMAConnection>( new TMAConnection{tma_gw_host, tma_gw_port} ) );
        }

        return std::unique_ptr<cpool::ConnectionPool>( new cpool::ConnectionPool{std::move( connections )} );
    }
};
</code>```

My trouble comes trying to access the derived classes functions and members.. such as TestCPPClient member, or querySymbols function...

```<code>class TMAConnection final : public cpool::Connection {
public:
    TMAConnection(const char* hostname, const int port){
      this->gateway_host=hostname;
      this->gateway_port=port;

    }
    bool heart_beat() override { return connected; }

    bool is_healthy() override { return connected; }

    bool connect() override {
        connected = true;
        return connected;
    }

    void disconnect() override {
      connected = false;
    }

    void querySymbols(std::vector<tmaapi::CD> & empty_contract_vect, std::vector<std::string> & queries_list) {
      this->tma_client.query_matching_tickers(empty_contract_vect, queries_list);
      std::vector<std::string> empty_vec;
    }

    TestCppClient tma_client;

private:
    TMAConnection(){}
    friend cpool::ConnectionPoolFactory<TMAConnection>;
    bool connected = false;

    const char* gateway_host;
    int gateway_port;
    uint16_t tma_client_id;
};
</code>```

When I look look at the ConnectionProxy code.. it seems i can get the member or derived class with an operator -> but no avail so far

https://github.com/malikkirchner/connection-pool/blob/master/src/pool.cpp#L61-L63

```<code>Connection* ConnectionPool::ConnectionProxy::operator->() { return m_connection; }

Connection& ConnectionPool::ConnectionProxy::operator*() { return *m_connection; }
</code>```

Here's where I try to call create to get a connection.. but then fail to get my derived class pointer

```<code>cpool::ConnectionPool::ConnectionProxy proxy_conn = this->tma_conn_pool->get_connection();

proxy_conn->is_healthy(); // this works fine if i don't cast.. since it's in the base class
proxy_conn->querySymbols(empty_contract_vect, sub_batch_vector);  // this fails
</code>```

I tried adding a dynamic cast.. doesn't seem to work

```<code>    cpool::ConnectionPool::ConnectionProxy proxy_conn = this->tma_conn_pool->get_connection();
    TMAConnection* x = dynamic_cast<TMAConnection*>(&proxy_conn));

    x->is_healthy();
    x->querySymbols(empty_contract_vect, sub_batch_vector);

/home/server/src/server.cpp:48:64: error: cannot dynamic_cast ‘& proxy_conn’ (of type ‘class cpool::ConnectionPool::ConnectionProxy*’) to type ‘class TMAConnection*’ (source type is not polymorphic)
   48 |     TMAConnection* x = dynamic_cast<TMAConnection*>(&proxy_conn));
</code>```

How can I get a pointer to my derived class?  is my factory wrong?  thank you

EDIT: I tried @typewriters suggestion to use auto .. still didn't work

```<code>auto proxy_conn = this->tma_conn_pool->get_connection();
TMAConnection* x = dynamic_cast<TMAConnection*>(&proxy_conn));

error: cannot dynamic_cast ‘& proxy_conn’ (of type ‘class cpool::ConnectionPool::ConnectionProxy*’) to type ‘class TMAConnection*’ (source type is not polymorphic)
</code>```

答:
ConnectionPool::get_connection() returns a ConnectionProxy which is not a Connection object directly, but holds one:

A ConnectionProxy allows you to access the underlying connection object.

```<code>// create a pool
auto pool = ...
// get a ConnectionProxy
auto proxy = pool->get_connection();

// cast to your type
if(auto conn = dynamic_cast<TMAConnection*>(proxy.operator->()))
{
    // success!
}
</code>```

Body:
I am attempting to access a derived class TMAConnection after receiving it via a baseclass factory method

template <>
class cpool::ConnectionPoolFactory<TMAConnection> {
public:
    static std::unique_ptr<cpool::ConnectionPool> create( const std::uint16_t num_connections, const char* tma_gw_host, const int tma_gw_port) {
        std::vector< std::unique_ptr<cpool::Connection> > connections;

        for ( std::uint16_t k = 0; k < num_connections; ++k ) {
            // cannot use std::make_unique, because constructor is hidden
            connections.emplace_back( std::unique_ptr<TMAConnection>( new TMAConnection{tma_gw_host, tma_gw_port} ) );
        }

        return std::unique_ptr<cpool::ConnectionPool>( new cpool::ConnectionPool{std::move( connections )} );
    }
};

My trouble comes trying to access the derived classes functions and members.. such as TestCPPClient member, or querySymbols function...

class TMAConnection final : public cpool::Connection {
public:
    TMAConnection(const char* hostname, const int port){
      this->gateway_host=hostname;
      this->gateway_port=port;

    }
    bool heart_beat() override { return connected; }

    bool is_healthy() override { return connected; }

    bool connect() override {
        connected = true;
        return connected;
    }

    void disconnect() override {
      connected = false;
    }

    void querySymbols(std::vector<tmaapi::CD> & empty_contract_vect, std::vector<std::string> & queries_list) {
      this->tma_client.query_matching_tickers(empty_contract_vect, queries_list);
      std::vector<std::string> empty_vec;
    }

    TestCppClient tma_client;

private:
    TMAConnection(){}
    friend cpool::ConnectionPoolFactory<TMAConnection>;
    bool connected = false;

    const char* gateway_host;
    int gateway_port;
    uint16_t tma_client_id;
};

When I look look at the ConnectionProxy code.. it seems i can get the member or derived class with an operator -> but no avail so far

https://github.com/malikkirchner/connection-pool/blob/master/src/pool.cpp#L61-L63

Connection* ConnectionPool::ConnectionProxy::operator->() { return m_connection; }

Connection& ConnectionPool::ConnectionProxy::operator*() { return *m_connection; }

Here's where I try to call create to get a connection.. but then fail to get my derived class pointer

cpool::ConnectionPool::ConnectionProxy proxy_conn = this->tma_conn_pool->get_connection();

proxy_conn->is_healthy(); // this works fine if i don't cast.. since it's in the base class
proxy_conn->querySymbols(empty_contract_vect, sub_batch_vector);  // this fails

I tried adding a dynamic cast.. doesn't seem to work

    cpool::ConnectionPool::ConnectionProxy proxy_conn = this->tma_conn_pool->get_connection();
    TMAConnection* x = dynamic_cast<TMAConnection*>(&proxy_conn));

    x->is_healthy();
    x->querySymbols(empty_contract_vect, sub_batch_vector);

/home/server/src/server.cpp:48:64: error: cannot dynamic_cast ‘& proxy_conn’ (of type ‘class cpool::ConnectionPool::ConnectionProxy*’) to type ‘class TMAConnection*’ (source type is not polymorphic)
   48 |     TMAConnection* x = dynamic_cast<TMAConnection*>(&proxy_conn));

How can I get a pointer to my derived class?  is my factory wrong?  thank you

EDIT: I tried @typewriters suggestion to use auto .. still didn't work

auto proxy_conn = this->tma_conn_pool->get_connection();
TMAConnection* x = dynamic_cast<TMAConnection*>(&proxy_conn));

error: cannot dynamic_cast ‘& proxy_conn’ (of type ‘class cpool::ConnectionPool::ConnectionProxy*’) to type ‘class TMAConnection*’ (source type is not polymorphic)

Body:
ConnectionPool::get_connection() returns a ConnectionProxy which is not a Connection object directly, but holds one:

A ConnectionProxy allows you to access the underlying connection object.

// create a pool
auto pool = ...
// get a ConnectionProxy
auto proxy = pool->get_connection();

// cast to your type
if(auto conn = dynamic_cast<TMAConnection*>(proxy.operator->()))
{
    // success!
}


问:
What is the file format of a git commit object data structure?
Context: I was hoping to be able to search through my git commit messages and commits without having to go through the puzzlingly complex git grep command, so I decided to see how git commit messages were stored.

I took a look in a .git folder, and it looks to me like commits are stored in

```<code>.git/objects
</code>```

The .git objects folder contains a bunch of folders with names like a6 and 9b.  These folders each contain a file with a name that looks like a commit sha 2f29598814b07fea915514cfc4d05129967bf7.  When I open one of those files in a text editor, I get gibberish.

What file format is this gibberish / How is a git commit object stored?

In this git commit log, the folder 9b contains one commit sha

```<code>aed8a9f773efb2f498f19c31f8603b6cb2a4bc
</code>```

Why, and is there a case where more than one commit sha would be stored in the file 9b?

is there a way to convert this gibberish into plain text so that I can mess with commits in a text editor?

答:
This is a rather old question but in case somebody is still wondering how to read the content of the objects - the easiest way is to run

git cat-file -p

So in case you have a folder with the following object

```<code>├── 4a
│   ├── 2500cb9eb44d57fd7abfd04a9911ab8e2b6733
</code>```

You would run:

git cat-file -p 4a2500cb9eb44d57fd7abfd04a9911ab8e2b6733

Body:
Context: I was hoping to be able to search through my git commit messages and commits without having to go through the puzzlingly complex git grep command, so I decided to see how git commit messages were stored.

I took a look in a .git folder, and it looks to me like commits are stored in

.git/objects

The .git objects folder contains a bunch of folders with names like a6 and 9b.  These folders each contain a file with a name that looks like a commit sha 2f29598814b07fea915514cfc4d05129967bf7.  When I open one of those files in a text editor, I get gibberish.

What file format is this gibberish / How is a git commit object stored?

In this git commit log, the folder 9b contains one commit sha

aed8a9f773efb2f498f19c31f8603b6cb2a4bc

Why, and is there a case where more than one commit sha would be stored in the file 9b?

is there a way to convert this gibberish into plain text so that I can mess with commits in a text editor?

Body:
This is a rather old question but in case somebody is still wondering how to read the content of the objects - the easiest way is to run

git cat-file -p

So in case you have a folder with the following object

├── 4a
│   ├── 2500cb9eb44d57fd7abfd04a9911ab8e2b6733

You would run:

git cat-file -p 4a2500cb9eb44d57fd7abfd04a9911ab8e2b6733