-all_load linker flag causes some linker errors:iOS (Bug #2861)


Added by idrish sorathiya about 12 years ago. Updated over 10 years ago.


Status:Cancelled Start date:2013-03-05
Priority:High Due date:
Assignee:Vadim Pisarevsky % Done:

0%

Category:build/install
Target version:-
Affected version:branch 'master' (3.0-dev) Operating System:iOS
Difficulty: HW Platform:ARM
Pull request:

Description

When I am adding linker flag -all_load in my Xcode build settings. It giving me some linker error that I have added few errors below.

Undefined symbols for architecture i386:
"_AVCaptureSessionPreset1280x720", referenced from:
-[CvAbstractCamera updateSize] in opencv2(cap_ios_abstract_camera.o)
"_AVCaptureSessionPreset352x288", referenced from:
-[CvAbstractCamera init] in opencv2(cap_ios_abstract_camera.o)
-[CvAbstractCamera updateSize] in opencv2(cap_ios_abstract_camera.o)
"_AVCaptureSessionPreset640x480", referenced from:
-[CvAbstractCamera initWithParentView:] in opencv2(cap_ios_abstract_camera.o)
-[CvAbstractCamera updateSize] in opencv2(cap_ios_abstract_camera.o)
"_AVCaptureSessionPresetHigh", referenced from:
-[CvAbstractCamera updateSize] in opencv2(cap_ios_abstract_camera.o)
"_AVCaptureSessionPresetLow", referenced from:
-[CvAbstractCamera createCaptureSession] in opencv2(cap_ios_abstract_camera.o)
-[CvAbstractCamera updateSize] in opencv2(cap_ios_abstract_camera.o)
"_AVCaptureSessionPresetMedium", referenced from:

Without that flag it compiled perfectly. That flag is necessary for me to load another library.

I am using precompiled library that I got from here: http://opencv.org/downloads.html


History

Updated by Andrey Kamaev about 12 years ago

  • Assignee changed from Andrey Kamaev to Vadim Pisarevsky

Updated by Vadim Pisarevsky almost 12 years ago

since OpenCV framework for iOS (as well as any iOS framework) is a static library, it does not link any external frameworks. I guess, the symbols like AVCaptureSessionPreset1280x720 are defined in some framework that's not added to your app.

  • Status changed from Open to Cancelled

Updated by idrish sorathiya over 11 years ago

I am alone not facing this issue. See Here : http://answers.opencv.org/question/20152/ios-opencv2framework-not-compile-with-linker-flag/

Please check what's the issue. Still I am looking for answer. If we simply remove that flag library is working properly.

If you are saying that this issue is due to another libary then just create new project and add opencv framework and -all_load flag you can see all these errors.

  • Status changed from Cancelled to Open

Updated by Alessandro Trebbi almost 11 years ago

I have answered in the forum and hope this fixes the issue , let me know

Updated by Vadim Pisarevsky over 10 years ago

ok, so it's indeed not OpenCV problem, it's iOS specific where all the framework are static libraries and they can not explicitly or implicitly resolve dependencies from other frameworks - it should be done by the user.

  • HW Platform set to ARM
  • Operating System set to iOS
  • Affected version changed from 2.4.4 to branch 'master' (3.0-dev)
  • Status changed from Open to Cancelled

Also available in: Atom PDF