Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

ios 6 and xcode 4.5

Hi,

I have been able to compile opencv correctly for ios 6 (i think), but when I try to add it to my project and compile my project, I got Apple Mach-O Linker Error such as:

Ld /Users/guillaume/Library/Developer/Xcode/DerivedData/panios-ebjroeuwobrkpjcdgkitygqxtrig/Build/Products/Debug-iphoneos/panios.app/panios normal armv7
    cd /Users/guillaume/Clients/Trax/panios/app
    setenv IPHONEOS_DEPLOYMENT_TARGET 4.3
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -L/Users/guillaume/Library/Developer/Xcode/DerivedData/panios-ebjroeuwobrkpjcdgkitygqxtrig/Build/Products/Debug-iphoneos -F/Users/guillaume/Library/Developer/Xcode/DerivedData/panios-ebjroeuwobrkpjcdgkitygqxtrig/Build/Products/Debug-iphoneos -F/Users/guillaume/Clients/Trax/panios/app -filelist /Users/guillaume/Library/Developer/Xcode/DerivedData/panios-ebjroeuwobrkpjcdgkitygqxtrig/Build/Intermediates/panios.build/Debug-iphoneos/panios.build/Objects-normal/armv7/panios.LinkFileList -dead_strip -weak_framework CoreFoundation -weak_framework UIKit -weak_framework AVFoundation -weak_framework CoreMedia -weak-lSystem -all_load -Obj-C -fobjc-link-runtime -miphoneos-version-min=4.3 -framework opencv2 -framework AssetsLibrary -framework CoreVideo /Users/guillaume/Library/Developer/Xcode/DerivedData/panios-ebjroeuwobrkpjcdgkitygqxtrig/Build/Products/Debug-iphoneos/libCordova.a -framework Foundation -weak_framework UIKit -framework CoreGraphics -framework AddressBook -framework AddressBookUI -framework AudioToolbox -weak_framework AVFoundation -framework CFNetwork -framework CoreLocation -framework MediaPlayer -framework QuartzCore -framework SystemConfiguration -framework MobileCoreServices -weak_framework CoreMedia -o /Users/guillaume/Library/Developer/Xcode/DerivedData/panios-ebjroeuwobrkpjcdgkitygqxtrig/Build/Products/Debug-iphoneos/panios.app/panios

Undefined symbols for architecture armv7:
  "vtable for __cxxabiv1::__vmi_class_type_info", referenced from:
      typeinfo for cv::Feature2D in opencv2(brisk.o)
      typeinfo for cv::DescriptorExtractor in opencv2(descriptors.o)
      typeinfo for cv::FeatureDetector in opencv2(detectors.o)
  NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
  "std::string::assign(char const*, unsigned long)", referenced from:
      cv::BmpDecoder::BmpDecoder() in opencv2(grfmt_bmp.o)
      cv::BmpEncoder::BmpEncoder() in opencv2(grfmt_bmp.o)
      cv::BmpEncoder::newEncoder() const in opencv2(grfmt_bmp.o)
      cv::PxMEncoder::PxMEncoder() in opencv2(grfmt_pxm.o)
      cv::PxMEncoder::newEncoder() const in opencv2(grfmt_pxm.o)
      cv::SunRasterDecoder::SunRasterDecoder() in opencv2(grfmt_sunras.o)
      cv::SunRasterEncoder::SunRasterEncoder() in opencv2(grfmt_sunras.o)
.......
  "std::cout", referenced from:
      cv::LDA::lda(cv::_InputArray const&, cv::_InputArray const&) in opencv2(lda.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Showing first 200 notices only

I have only added the generated opencv2.framework to my project and added:

#ifdef __cplusplus
    #import <opencv2/opencv.hpp>
#endif

At the beginning of my *-Prefix.pch file

Any idea what could be the problem?

Thank you!

ios 6 and xcode 4.54.5 linker problems

Hi,

I have been able to compile opencv correctly for ios 6 (i think), but when I try to add it to my project and compile my project, I got Apple Mach-O Linker Error such as:

Ld /Users/guillaume/Library/Developer/Xcode/DerivedData/panios-ebjroeuwobrkpjcdgkitygqxtrig/Build/Products/Debug-iphoneos/panios.app/panios normal armv7
    cd /Users/guillaume/Clients/Trax/panios/app
    setenv IPHONEOS_DEPLOYMENT_TARGET 4.3
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -L/Users/guillaume/Library/Developer/Xcode/DerivedData/panios-ebjroeuwobrkpjcdgkitygqxtrig/Build/Products/Debug-iphoneos -F/Users/guillaume/Library/Developer/Xcode/DerivedData/panios-ebjroeuwobrkpjcdgkitygqxtrig/Build/Products/Debug-iphoneos -F/Users/guillaume/Clients/Trax/panios/app -filelist /Users/guillaume/Library/Developer/Xcode/DerivedData/panios-ebjroeuwobrkpjcdgkitygqxtrig/Build/Intermediates/panios.build/Debug-iphoneos/panios.build/Objects-normal/armv7/panios.LinkFileList -dead_strip -weak_framework CoreFoundation -weak_framework UIKit -weak_framework AVFoundation -weak_framework CoreMedia -weak-lSystem -all_load -Obj-C -fobjc-link-runtime -miphoneos-version-min=4.3 -framework opencv2 -framework AssetsLibrary -framework CoreVideo /Users/guillaume/Library/Developer/Xcode/DerivedData/panios-ebjroeuwobrkpjcdgkitygqxtrig/Build/Products/Debug-iphoneos/libCordova.a -framework Foundation -weak_framework UIKit -framework CoreGraphics -framework AddressBook -framework AddressBookUI -framework AudioToolbox -weak_framework AVFoundation -framework CFNetwork -framework CoreLocation -framework MediaPlayer -framework QuartzCore -framework SystemConfiguration -framework MobileCoreServices -weak_framework CoreMedia -o /Users/guillaume/Library/Developer/Xcode/DerivedData/panios-ebjroeuwobrkpjcdgkitygqxtrig/Build/Products/Debug-iphoneos/panios.app/panios

Undefined symbols for architecture armv7:
  "vtable for __cxxabiv1::__vmi_class_type_info", referenced from:
      typeinfo for cv::Feature2D in opencv2(brisk.o)
      typeinfo for cv::DescriptorExtractor in opencv2(descriptors.o)
      typeinfo for cv::FeatureDetector in opencv2(detectors.o)
  NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
  "std::string::assign(char const*, unsigned long)", referenced from:
      cv::BmpDecoder::BmpDecoder() in opencv2(grfmt_bmp.o)
      cv::BmpEncoder::BmpEncoder() in opencv2(grfmt_bmp.o)
      cv::BmpEncoder::newEncoder() const in opencv2(grfmt_bmp.o)
      cv::PxMEncoder::PxMEncoder() in opencv2(grfmt_pxm.o)
      cv::PxMEncoder::newEncoder() const in opencv2(grfmt_pxm.o)
      cv::SunRasterDecoder::SunRasterDecoder() in opencv2(grfmt_sunras.o)
      cv::SunRasterEncoder::SunRasterEncoder() in opencv2(grfmt_sunras.o)
.......
  "std::cout", referenced from:
      cv::LDA::lda(cv::_InputArray const&, cv::_InputArray const&) in opencv2(lda.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Showing first 200 notices only

I have only added the generated opencv2.framework to my project and added:

#ifdef __cplusplus
    #import <opencv2/opencv.hpp>
#endif

At the beginning of my *-Prefix.pch file

Any idea what could be the problem?

Thank you!