- Home /
Error Importing OpenCV Framework to Unity Project iOS
I built OpenCV using the script available here: http://aptogo.co.uk/2011/09/opencv-framework-for-ios/
Then created a Unity3d iOS project, generated the xcode project from Unity3d, added the OpenCV framework to the project and tried to compile.
I get the following error:
duplicate symbol _adler32 in /my-path/Libraries/libiPhone-lib.a(adler32.o) and /my-path/OpenCV.framework/OpenCV(adler32.o) for architecture armv7
I tried to remove adler32.so from the OpenCV lib, using "lipo" and "ar" then repackaged the lib, and I got another duplicated symbol. Eventually I removed a lot of objects from the OpenCV lib and it started complaining about missing symbols.
It was a fun experiment but didn't worked.
If I create a project on xcode with OpenCV it compiles without errors. Unity3d project without OpenCV also works.
xcode version: 4.3.3 unity3d version: 3.5.2 (latest) OpenCV: 2.4.1
I searched for linker option under xcode to see if I could make it more permissive but didnt found anything.
Any idea how to solve the error?
I'm researching on implementing OpenCV with unity for object detection. After you've made some progress, it'll be nice if you put up a tutorial or explain how you did the whole thing. I have never used OpenCV or any other image processing library before.
Your answer
![](https://koobas.hobune.stream/wayback/20220613073334im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
XCode Errors: "_AVCaptureSession" - Unity 3.5 compile problems? 2 Answers
Linker errors on Xcode 4.5.2 with OpenCV 2.4.3 2 Answers
Linker error - Unity on iOS/React Native project 1 Answer
Apple Mach-O Linker Error 0 Answers
Linker error when creating a static iOS library that depends on another static library. 1 Answer