[BarcodeReaderD12] Linker error code : 1
valberhcustodio opened this issue · 6 comments
Hello,
When I compile the BarcodeReader12 project I receive the error message below.
I added the frameworks (MLKitCommon, MLKitVision and MLKitBarcodeScanning) to the SDK Manager.
Error messages
[DCC Error] E2597 ld: warning: Could not find or use auto-linked framework 'GoogleUtilities'
Undefined symbols for architecture arm64:
Error: "OBJC_CLASS$_GPBEnumArray", referenced from: objc-class-ref in iOS/MLKitBarcodeScanning.framework/MLKitBarcodeScanning;
Error: "__ZN11MLKITx_absl14kLogDebugFatalE", referenced from: __ZN12_GLOBAL__N_117EdgeClippingLayer5BuildERKN9S2Builder5GraphEP7S2Error in iOS/MLKitBarcodeScanning.framework/MLKitBarcodeScanning; _ZN2S214VertexCrossingERK7Vector3IdES3_S3_S3 in iOS/MLKitBarcodeScanning.framework/MLKitBarcodeScanning; __ZN3gtl15dense_hashtableIiiN9__gnu_cxx4hashIiEENS_14dense_hash_setIiS3_NSt3__18equal_toIiEENS5_9allocatorIiEEE8IdentityENSA_6SetKeyES7_S9_E17check_use_deletedEPKc in iOS/MLKitBarcodeScanning.framework/MLKitBarcodeScanning; _ZN3gtl18compact_array_baseIiNSt3__19allocatorIiEEE6InsertEPKiRS5 in iOS/MLKitBarcodeScanning.framework/MLKitBarcodeScanning; _ZN9S2Polygon15InitToOperationEN18S2BooleanOperation6OpTypeERKN9S2Builder12SnapFunctionERKS_S7 in iOS/MLKitBarcodeScanning.framework/MLKitBarcodeScanning; __ZNK19MutableS2ShapeIndex8Iterator7GetCellEv in iOS/MLKitBarcodeScanning.framework/MLKitBarcodeScanning; __ZN19MutableS2ShapeIndex15AbsorbIndexCellERK12S2PaddedCellRKNS_8IteratorEPNSt3__16vectorIPKNS_11ClippedEdgeENS6_9allocatorISA_EEEEPNS_15InteriorTrackerEPNS_13EdgeAllocatorE in iOS/MLKitBarcodeScanning.framework/MLKitBarcodeScanning; ...
Error: "__ZN11MLKITx_absl16numbers_internal16two_ASCII_digitsE", referenced from: __ZNK11MLKITx_absl8LogEntry29AppendSeverityTimeAndThreadIdENS_13time_internal4cctz6detail10civil_timeINS1_10second_tagEEENS_8DurationEPNSt3__112basic_stringIcNS8_11char_traitsIcEENS8_9allocatorIcEEEE in iOS/MLKitBarcodeScanning.framework/MLKitBarcodeScanning;
Error: "__ZN11MLKITx_absl20raw_logging_internal17RegisterAbortHookEPFvPKciS2_S2_S2_E", referenced from: __GLOBAL__sub_I_raw_logging.cc in iOS/MLKitBarcodeScanning.framework/MLKitBarcodeScanning;
Error: "__ZN11MLKITx_absl20raw_logging_internal17SafeWriteToStderrEPKcm", referenced from: __ZN11MLKITx_absl16logging_internal10LogMessage5FlushEv in iOS/MLKitBarcodeScanning.framework/MLKitBarcodeScanning; __Z18DebugWriteToStderrPKcPv in iOS/MLKitBarcodeScanning.framework/MLKitBarcodeScanning;
Error: "__ZN11MLKITx_absl20raw_logging_internal21RegisterLogPrefixHookEPFbNS_11LogSeverityEPKciPPcPiE", referenced from: __GLOBAL__sub_I_raw_logging.cc in iOS/MLKitBarcodeScanning.framework/MLKitBarcodeScanning;
Error: "__ZN11MLKITx_absl20raw_logging_internal21internal_log_functionE", referenced from: __ZNK11MLKITx_absl14flags_internal8FlagImpl33CheckDefaultValueParsingRoundtripEv in iOS/MLKitBarcodeScanning.framework/MLKitBarcodeScanning; __ZNK11MLKITx_absl14flags_internal9FlagState7RestoreEv in iOS/MLKitBarcodeScanning.framework/MLKitBarcodeScanning; __ZN11MLKITx_absl17internal_statusor6Helper26HandleInvalidStatusCtorArgEPNS_6StatusE in iOS/MLKitBarcodeScanning.framework/MLKitBarcodeScanning; __ZN3$_08__invokeEv in iOS/MLKitBarcodeScanning.framework/MLKitBarcodeScanning; __ZN3$_18__invokeEv in iOS/MLKitBarcodeScanning.framework/MLKitBarcodeScanning; __ZN3$_28__invokeEv in iOS/MLKitBarcodeScanning.framework/MLKitBarcodeScanning; __ZN11MLKITx_absl10CordForest11ConcatNodesEv in iOS/MLKitBarcodeScanning.framework/MLKitBarcodeScanning; ...
Error: "__ZN11MLKITx_absl20raw_logging_internal27RegisterInternalLogFunctionEPFvNS_11LogSeverityEPKciRKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEE", referenced from: __GLOBAL__sub_I_logging.cc in iOS/MLKitBarcodeScanning.framework/MLKitBarcodeScanning;
Error: "__ZN11MLKITx_absl20raw_logging_internal6RawLogENS_11LogSeverityEPKciS3_z", referenced from: __ZN11MLKITx_absl5Mutex5BlockEPNS_13base_internal14PerThreadSynchE in iOS/MLKitBarcodeScanning.framework/MLKitBarcodeScanning; __ZNK11MLKITx_absl5Mutex16AssertReaderHeldEv in iOS/MLKitBarcodeScanning.framework/MLKitBarcodeScanning; __ZN11MLKITx_absl5Mutex12LockSlowLoopEPNS_15SynchWaitParamsEi in iOS/MLKitBarcodeScanning.framework/MLKitBarcodeScanning; __ZN11MLKITx_abslL14PostSynchEventEPvi in iOS/MLKitBarcodeScanning.framework/MLKitBarcodeScanning; __ZN11MLKITx_abslL23CheckForMutexCorruptionElPKc in iOS/MLKitBarcodeScanning.framework/MLKitBarcodeScanning; __ZN11MLKITx_abslL7EnqueueEPNS_13base_internal14PerThreadSynchEPNS_15SynchWaitParamsEli in iOS/MLKitBarcodeScanning.framework/MLKitBarcodeScanning; __ZNK11MLKITx_absl5Mutex10AssertHeldEv in iOS/MLKitBarcodeScanning.framework/MLKitBarcodeScanning; ...
Error: "_ZN11MLKITx_absldvENS_7uint128ES0", referenced from: _ZN11MLKITx_absl13time_internal12IDivDurationEbNS_8DurationES1_PS1 in iOS/MLKitBarcodeScanning.framework/MLKitBarcodeScanning;
ld: symbol(s) not found for architecture arm64
[DCC Fatal Error] F2588 Linker error code: 1 ($00000001)
Failed
Please indicate
Delphi Version: 12.2
Platform(s) that the issue occurs on: iOS
iPhoneOS 18.0
Steps To Reproduce
I just compiled the project.
I added the frameworks (MLKitCommon, MLKitVision and MLKitBarcodeScanning) to the SDK Manager.
You don't add these frameworks to the SDK Manager, they're added to the framework search path, as per the instructions.
Please read the entire instructions
I'm not sure if this would be the problem.
I redid all the steps as follows:
- I deleted the iOS SDK in the SDK Manager and recreated it.
- I added Swift support
- I downloaded the Firebase iOS SDK 11.2.0
- I created the Firebase environment variable, pointing to the Firebase iOS SDK path.
- I unzipped the MLKitBarcodeScanning.framework.zip
- I didn't create the FIREBASE conditional defines because I don't use the FCM implementation in the project.
- I defined the Framework Search Path according to the documentation (ThirdParty\iOS and Firebase iOS SDK paths).
- I added the ThirdParty\iOS folder and the Kastri dependencies to the Project Search Path.
- I set the Minimum iOS version supported to 12.0
- I added the values informed in the documentation for Options passed to the LD Linker.
However, when I compile the project I get the same error.
I'm using Delphi 12.2
On Mac I use XCode 16.0
The iPhoneSDK version is 18.0
Is there something I'm not considering?
In Delphi 12.1 with iPhoneSDK 17.2 I was using this feature without any problems.
I defined the Framework Search Path according to the documentation (ThirdParty\iOS and Firebase iOS SDK paths).
That (as well as some of the other properties) should already be in the demo. Is this your own project? Either way, can you attach the .dproj here? (rename the extension to .dproj.txt)
This is the demo project, but I saved it in another folder.
BarcodeReaderD12.dproj.txt
The project seems to be configured OK. Are you using the latest files from Kastri? They were updated last week
I pulled the repository and no updates were made. So I decided to delete the Kastri folder and sync again. This solved the problem.
Thank you very much for your attention and sorry for the inconvenience.