c++ - Apple Mach-O Linker (ld) Error Group when OpenCV is added to the library; possible fix? -
apple mach-o linker (ld) error group , found many existing question same tag, none did fix issue.
i trying include opencv project in order track hand position. , far works fine, when build project. gives error : apple mach-o linker (ld) error group
.
from log here obtained :
ld /users/shaheenakader/library/developer/xcode/deriveddata/handseg-fiojpqxgqvrsbxadwvnbdsljpycy/build/products/debug/handseg normal x86_64 cd /users/shaheenakader/documents/tracking export macosx_deployment_target=10.9 /applications/xcode.app/contents/developer/toolchains/xcodedefault.xctoolchain/usr/bin/clang++ -arch x86_64 -isysroot /applications/xcode.app/contents/developer/platforms/macosx.platform/developer/sdks/macosx10.12.sdk -l/users/shaheenakader/library/developer/xcode/deriveddata/handseg-fiojpqxgqvrsbxadwvnbdsljpycy/build/products/debug -l/usr/local/lib -f/users/shaheenakader/library/developer/xcode/deriveddata/handseg-fiojpqxgqvrsbxadwvnbdsljpycy/build/products/debug -filelist /users/shaheenakader/library/developer/xcode/deriveddata/handseg-fiojpqxgqvrsbxadwvnbdsljpycy/build/intermediates/handseg.build/debug/handseg.build/objects-normal/x86_64/handseg.linkfilelist -mmacosx-version-min=10.9 -xlinker -object_path_lto -xlinker /users/shaheenakader/library/developer/xcode/deriveddata/handseg-fiojpqxgqvrsbxadwvnbdsljpycy/build/intermediates/handseg.build/debug/handseg.build/objects-normal/x86_64/handseg_lto.o -xlinker -export_dynamic -xlinker -no_deduplicate -stdlib=libc++ -lopencv_calib3d -lopencv_core -lopencv_features2d -lopencv_flann -lopencv_highgui -lopencv_imgcodecs -lopencv_imgproc -lopencv_ml -lopencv_objdetect -lopencv_photo -lopencv_shape -lopencv_stitching -lopencv_superres -lopencv_ts -lopencv_video -lopencv_videoio -lopencv_videostab -lopencv_core.2.4.10 -lopencv_objdetect.2.4.10 -lopencv_highgui.2.4.10 -lopencv_imgproc.2.4.10 -xlinker -dependency_info -xlinker /users/shaheenakader/library/developer/xcode/deriveddata/handseg-fiojpqxgqvrsbxadwvnbdsljpycy/build/intermediates/handseg.build/debug/handseg.build/objects-normal/x86_64/handseg_dependency_info.dat -o /users/shaheenakader/library/developer/xcode/deriveddata/handseg-fiojpqxgqvrsbxadwvnbdsljpycy/build/products/debug/handseg
also,
ld: library not found -lopencv_imgcodecs clang: error: linker command failed exit code 1 (use -v see invocation)
previously
i manually built opencv
library using cmake
.
and inside xcode project, set header search path : /usr/local/include
and library search path : /usr/local/lib
.
also, set other linker flags : -lopencv_calib3d -lopencv_core -lopencv_features2d -lopencv_flann -lopencv_highgui -lopencv_imgcodecs -lopencv_imgproc -lopencv_ml -lopencv_objdetect -lopencv_photo -lopencv_shape -lopencv_stitching -lopencv_superres -lopencv_ts -lopencv_video -lopencv_videoio -lopencv_videostab
what possibly causing issue, , how resolve issue? appreciated.
it’s not enough link libraries in xcode. need add libraries projects. so, go /usr/local/libs
, drags them project explorer (the left panel of xcode) , choose create references on pop window. can uncheck option copy if needed
on window avoid unnecessary clones of libraries.
Comments
Post a Comment