-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Description
Describe the issue
When integrating RapidOCR with ONNX Runtime in a .NET MAUI app for iOS and MacCatalyst, I encounter a linker error: Undefined symbols for architecture arm64: _registerCustomOps. The symbol is declared in onnxruntime_c_api.h and expected to be implemented by RapidOCR’s librapidocr.a, which provides custom ops for OCR models. The error occurs during the build for net8.0-ios and net8.0-maccatalyst targets, suggesting that _registerCustomOps is missing from librapidocr.a for arm64 or that ONNX Runtime’s custom ops registration (RegisterCustomOpsUsingFunction) is misconfigured for mobile/mac platforms.
Expected Behavior: The linker should resolve _registerCustomOps, allowing the app to build and run RapidOCR’s ONNX models with custom ops on iOS and MacCatalyst.
Actual Behavior: Linker error: Undefined symbols for architecture arm64: _registerCustomOps.
To reproduce
Load models in .NET MAUI app running on framework net8.0-maccatalyst or ios
Urgency
n/a
Platform
MAUI
OS Version
8.0
ONNX Runtime Installation
Other / Unknown
Compiler Version (if 'Built from Source')
No response
Package Name (if 'Released Package')
None
ONNX Runtime Version or Commit ID
1.13.1
ONNX Runtime API
C++/C
Architecture
ARM64
Execution Provider
Default CPU
Execution Provider Library Version
No response