# Linking error in Xcode

**URL:** <https://forum.opencv.org/t/linking-error-in-xcode/2487>\
**Category:** C++\
**Tags:** xcode, build, apple\
**Created:** [March 30, 2021, 12:13pm UTC](https://forum.opencv.org/t/linking-error-in-xcode/2487 "2021-03-30T12:13:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Edwin\_Zeng](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/edwin_zeng/32/1624_2.png) [@Edwin\_Zeng](https://forum.opencv.org/u/Edwin_Zeng)\
**Post date:** [March 30, 2021, 12:13pm UTC](https://forum.opencv.org/t/linking-error-in-xcode/2487/1 "2021-03-30T12:13:36Z")

</div>

I had updated the opencv2 framework (iOS) to the latest one.

I am compiling it for a Mac-OS app. Previously, I had no such problems but Xcode is now giving an error:  
_building for macOS, but linking in object file built for iOS Simulator, for architecture x86\_64_

I had read that the framework needs to be in XCFramework. Does anyone know how to resolve this?  
Thanks!
