Bug 15334 - error MT5202: Native linking failed. (OpenCV.framework)
Summary: error MT5202: Native linking failed. (OpenCV.framework)
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: 6.4.4
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-10-10 14:23 UTC by Jon Goldberger [MSFT]
Modified: 2013-10-11 04:08 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Test Project (106.22 KB, application/zip)
2013-10-10 14:23 UTC, Jon Goldberger [MSFT]
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Jon Goldberger [MSFT] 2013-10-10 14:23:12 UTC
Created attachment 5118 [details]
Test Project

I've created a Cocoa library using Xcode 5 that use openCV prebuilt library as a framework. The library has one mm file that implement an objective c interface with one function written using c++. The library builds correctly and I can create the fat file using make.
I have also created a monotouch binding project with the definition and link file like this

[assembly: LinkWith ("libLibraryTest.a", LinkTarget.ArmV7s | LinkTarget.ArmV7 | LinkTarget.Simulator, ForceLoad = true, Frameworks="Foundation Accelerate CoreGraphics AssetsLibrary AVFoundation CoreImage CoreMedia CoreVideo QuartzCore", LinkerFlags = "-stdlib=libc++ -ObjC -lc++ ", IsCxx=true)]

The binding project builds correctly.

When I create a sample app and I compile it I receive the error attached. I'm sure that the c++ library contains i386, because I built it using -sdk iphonesimulator flag. Could you help me to resolve this problem?
=========================================================================================================
Build output:
Compiling to native code
/Developer/MonoTouch/usr/bin/mtouch -sdkroot "/Applications/Xcode.app/Contents/Developer" --cache "/Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache" --nomanifest --nosign -sim "/Users/cristiancivera/Projects/Test1/bin/iPhoneSimulator/Debug/Test1.app" -r "/Users/cristiancivera/Projects/Test1/LibraryTest/bin/Debug/LibraryTest.dll" -r "/Developer/MonoTouch/usr/lib/mono/2.1/System.dll" -r "/Developer/MonoTouch/usr/lib/mono/2.1/System.Xml.dll" -r "/Developer/MonoTouch/usr/lib/mono/2.1/System.Core.dll" -r "/Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll" -debug -nolink -sdk "7.0" -targetver "6.0" --abi=i386 "-cxx" "-v" "-v" "-v" "/Users/cristiancivera/Projects/Test1/bin/iPhoneSimulator/Debug/Test1.exe"
Xamarin.iOS 7.0.1.4 (4cfca2f) Business Edition using framework: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk
Copied /Users/cristiancivera/Projects/Test1/bin/iPhoneSimulator/Debug/Test1.exe to /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/PreBuild/Test1.exe
Copied /Users/cristiancivera/Projects/Test1/bin/iPhoneSimulator/Debug/Test1.exe.mdb to /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/PreBuild/Test1.exe.mdb
Copied /Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll to /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/PreBuild/monotouch.dll
Copied /Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll.mdb to /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/PreBuild/monotouch.dll.mdb
Copied /Developer/MonoTouch/usr/lib/mono/2.1/mscorlib.dll to /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/PreBuild/mscorlib.dll
Copied /Developer/MonoTouch/usr/lib/mono/2.1/mscorlib.dll.mdb to /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/PreBuild/mscorlib.dll.mdb
Copied /Developer/MonoTouch/usr/lib/mono/2.1/System.Core.dll to /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/PreBuild/System.Core.dll
Copied /Developer/MonoTouch/usr/lib/mono/2.1/System.Core.dll.mdb to /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/PreBuild/System.Core.dll.mdb
Copied /Developer/MonoTouch/usr/lib/mono/2.1/System.dll to /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/PreBuild/System.dll
Copied /Developer/MonoTouch/usr/lib/mono/2.1/System.dll.mdb to /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/PreBuild/System.dll.mdb
Copied /Developer/MonoTouch/usr/lib/mono/2.1/System.Xml.dll to /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/PreBuild/System.Xml.dll
Copied /Developer/MonoTouch/usr/lib/mono/2.1/System.Xml.dll.mdb to /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/PreBuild/System.Xml.dll.mdb
Copied /Users/cristiancivera/Projects/Test1/LibraryTest/bin/Debug/LibraryTest.dll to /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/PreBuild/LibraryTest.dll
Copied /Users/cristiancivera/Projects/Test1/LibraryTest/bin/Debug/LibraryTest.dll.mdb to /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/PreBuild/LibraryTest.dll.mdb
Copied /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/PreBuild/Test1.exe to /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/Build/Test1.exe
Copied /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/PreBuild/Test1.exe.mdb to /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/Build/Test1.exe.mdb
Copied /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/PreBuild/monotouch.dll to /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/Build/monotouch.dll
Copied /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/PreBuild/monotouch.dll.mdb to /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/Build/monotouch.dll.mdb
Copied /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/PreBuild/mscorlib.dll to /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/Build/mscorlib.dll
Copied /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/PreBuild/mscorlib.dll.mdb to /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/Build/mscorlib.dll.mdb
Copied /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/PreBuild/System.Core.dll to /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/Build/System.Core.dll
Copied /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/PreBuild/System.Core.dll.mdb to /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/Build/System.Core.dll.mdb
Copied /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/PreBuild/System.dll to /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/Build/System.dll
Copied /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/PreBuild/System.dll.mdb to /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/Build/System.dll.mdb
Copied /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/PreBuild/System.Xml.dll to /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/Build/System.Xml.dll
Copied /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/PreBuild/System.Xml.dll.mdb to /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/Build/System.Xml.dll.mdb
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++  -gdwarf-2 -arch i386 -std=c99 -I/Developer/MonoTouch/SDKs/MonoTouch.iphonesimulator.sdk/usr/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk -Qunused-arguments -fobjc-legacy-dispatch -fobjc-abi-version=2 -mios-simulator-version-min=6.0 -c -o /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/main.i386.o -x objective-c /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/main.i386.m
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++  -stdlib=libc++ -ObjC -lc++  -Wl,-pie  -gdwarf-2 -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk -Qunused-arguments -fobjc-legacy-dispatch -fobjc-abi-version=2 -mios-simulator-version-min=6.0 /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/main.i386.o -force_load /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/libLibraryTest.a -o /Users/cristiancivera/Projects/Test1/bin/iPhoneSimulator/Debug/Test1.app/Test1 -framework CFNetwork -framework AssetsLibrary -framework Accounts -framework AVFoundation -framework CoreBluetooth -framework CoreTelephony -framework EventKit -framework EventKitUI -framework Foundation -framework CoreMotion -framework GameKit -framework GLKit -framework iAd -framework MapKit -framework MediaPlayer -framework MessageUI -framework NewsstandKit -framework OpenGLES -framework Social -framework StoreKit -framework Twitter -framework UIKit -framework PassKit -framework AddressBookUI -framework AudioToolbox -framework CoreImage -framework ImageIO -framework Security -framework SystemConfiguration -framework AddressBook -framework QuartzCore -framework CoreData -framework CoreGraphics -framework CoreLocation -framework CoreText -framework MobileCoreServices -framework CoreMedia -framework CoreMIDI -framework CoreVideo -framework ExternalAccessory -framework AdSupport -framework QuickLook -framework Accelerate -weak_framework SpriteKit -weak_framework JavaScriptCore -weak_framework MultipeerConnectivity -weak_framework GameController -weak_framework MediaAccessibility -weak_framework SafariServices -lz -liconv -u _mono_pmip -u _monotouch_get_locale_country_code -u _monotouch_log -u _monotouch_start_wwan -u _monotouch_timezone_get_data -u _monotouch_timezone_get_names -u _monotouch_IntPtr_objc_msgSend_IntPtr -u _monotouch_IntPtr_objc_msgSendSuper_IntPtr -u _monotouch_release_managed_ref -u _monotouch_create_managed_ref -u _CloseZStream -u _CreateZStream -u _Flush -u _ReadZStream -u _WriteZStream /Developer/MonoTouch/SDKs/MonoTouch.iphonesimulator.sdk/usr/lib/libmonoboehm-2.0.a /Developer/MonoTouch/SDKs/MonoTouch.iphonesimulator.sdk/usr/lib/libmonotouch-debug.a
Process exited with code 1, command:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++  -stdlib=libc++ -ObjC -lc++  -Wl,-pie  -gdwarf-2 -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk -Qunused-arguments -fobjc-legacy-dispatch -fobjc-abi-version=2 -mios-simulator-version-min=6.0 /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/main.i386.o -force_load /Users/cristiancivera/Projects/Test1/obj/iPhoneSimulator/Debug/mtouch-cache/libLibraryTest.a -o /Users/cristiancivera/Projects/Test1/bin/iPhoneSimulator/Debug/Test1.app/Test1 -framework CFNetwork -framework AssetsLibrary -framework Accounts -framework AVFoundation -framework CoreBluetooth -framework CoreTelephony -framework EventKit -framework EventKitUI -framework Foundation -framework CoreMotion -framework GameKit -framework GLKit -framework iAd -framework MapKit -framework MediaPlayer -framework MessageUI -framework NewsstandKit -framework OpenGLES -framework Social -framework StoreKit -framework Twitter -framework UIKit -framework PassKit -framework AddressBookUI -framework AudioToolbox -framework CoreImage -framework ImageIO -framework Security -framework SystemConfiguration -framework AddressBook -framework QuartzCore -framework CoreData -framework CoreGraphics -framework CoreLocation -framework CoreText -framework MobileCoreServices -framework CoreMedia -framework CoreMIDI -framework CoreVideo -framework ExternalAccessory -framework AdSupport -framework QuickLook -framework Accelerate -weak_framework SpriteKit -weak_framework JavaScriptCore -weak_framework MultipeerConnectivity -weak_framework GameController -weak_framework MediaAccessibility -weak_framework SafariServices -lz -liconv -u _mono_pmip -u _monotouch_get_locale_country_code -u _monotouch_log -u _monotouch_start_wwan -u _monotouch_timezone_get_data -u _monotouch_timezone_get_names -u _monotouch_IntPtr_objc_msgSend_IntPtr -u _monotouch_IntPtr_objc_msgSendSuper_IntPtr -u _monotouch_release_managed_ref -u _monotouch_create_managed_ref -u _CloseZStream -u _CreateZStream -u _Flush -u _ReadZStream -u _WriteZStream /Developer/MonoTouch/SDKs/MonoTouch.iphonesimulator.sdk/usr/lib/libmonoboehm-2.0.a /Developer/MonoTouch/SDKs/MonoTouch.iphonesimulator.sdk/usr/lib/libmonotouch-debug.a
Undefined symbols for architecture i386:
  "cv::cvarrToMat(void const*, bool, bool, int)", referenced from:
      -[LibraryTest processImage:] in libLibraryTest.a(LibraryTest.o)
  "cv::FeatureDetector::~FeatureDetector()", referenced from:
      construction vtable for cv::FeatureDetector-in-cv::ORB in libLibraryTest.a(LibraryTest.o)
      construction vtable for cv::FeatureDetector-in-cv::Feature2D in libLibraryTest.a(LibraryTest.o)
  "cv::FeatureDetector::~FeatureDetector()", referenced from:
      construction vtable for cv::FeatureDetector-in-cv::ORB in libLibraryTest.a(LibraryTest.o)
      construction vtable for cv::FeatureDetector-in-cv::Feature2D in libLibraryTest.a(LibraryTest.o)
  "cv::FeatureDetector::~FeatureDetector()", referenced from:
      -[LibraryTest processImage:] in libLibraryTest.a(LibraryTest.o)
      cv::ORB::~ORB() in libLibraryTest.a(LibraryTest.o)
      non-virtual thunk to cv::ORB::~ORB() in libLibraryTest.a(LibraryTest.o)
      cv::ORB::~ORB() in libLibraryTest.a(LibraryTest.o)
      non-virtual thunk to cv::ORB::~ORB() in libLibraryTest.a(LibraryTest.o)
      cv::Feature2D::~Feature2D() in libLibraryTest.a(LibraryTest.o)
      cv::Feature2D::~Feature2D() in libLibraryTest.a(LibraryTest.o)
      ...
  "cv::DescriptorExtractor::~DescriptorExtractor()", referenced from:
      construction vtable for cv::DescriptorExtractor-in-cv::ORB in libLibraryTest.a(LibraryTest.o)
      construction vtable for cv::DescriptorExtractor-in-cv::Feature2D in libLibraryTest.a(LibraryTest.o)
  "cv::DescriptorExtractor::~DescriptorExtractor()", referenced from:
      construction vtable for cv::DescriptorExtractor-in-cv::ORB in libLibraryTest.a(LibraryTest.o)
      construction vtable for cv::DescriptorExtractor-in-cv::Feature2D in libLibraryTest.a(LibraryTest.o)
  "cv::DescriptorExtractor::~DescriptorExtractor()", referenced from:
      -[LibraryTest processImage:] in libLibraryTest.a(LibraryTest.o)
      cv::ORB::~ORB() in libLibraryTest.a(LibraryTest.o)
      non-virtual thunk to cv::ORB::~ORB() in libLibraryTest.a(LibraryTest.o)
      cv::ORB::~ORB() in libLibraryTest.a(LibraryTest.o)
      non-virtual thunk to cv::ORB::~ORB() in libLibraryTest.a(LibraryTest.o)
      cv::Feature2D::~Feature2D() in libLibraryTest.a(LibraryTest.o)
      cv::Feature2D::~Feature2D() in libLibraryTest.a(LibraryTest.o)
      ...
  "cv::Mat::deallocate()", referenced from:
      cvMatFromUIImage(UIImage*) in libLibraryTest.a(LibraryTest.o)
      -[LibraryTest processImage:] in libLibraryTest.a(LibraryTest.o)
  "cv::Mat::create(int, int const*, int)", referenced from:
      cvMatFromUIImage(UIImage*) in libLibraryTest.a(LibraryTest.o)
      -[LibraryTest processImage:] in libLibraryTest.a(LibraryTest.o)
  "cv::ORB::ORB(int, float, int, int, int, int, int, int)", referenced from:
      -[LibraryTest processImage:] in libLibraryTest.a(LibraryTest.o)
  "cv::fastFree(void*)", referenced from:
      cvMatFromUIImage(UIImage*) in libLibraryTest.a(LibraryTest.o)
      -[LibraryTest processImage:] in libLibraryTest.a(LibraryTest.o)
  "cv::Algorithm::read(cv::FileNode const&)", referenced from:
      construction vtable for cv::Feature2D-in-cv::ORB in libLibraryTest.a(LibraryTest.o)
      construction vtable for cv::FeatureDetector-in-cv::ORB in libLibraryTest.a(LibraryTest.o)
      construction vtable for cv::DescriptorExtractor-in-cv::ORB in libLibraryTest.a(LibraryTest.o)
      vtable for cv::Feature2D in libLibraryTest.a(LibraryTest.o)
      construction vtable for cv::FeatureDetector-in-cv::Feature2D in libLibraryTest.a(LibraryTest.o)
      construction vtable for cv::DescriptorExtractor-in-cv::Feature2D in libLibraryTest.a(LibraryTest.o)
  "cv::Algorithm::~Algorithm()", referenced from:
      -[LibraryTest processImage:] in libLibraryTest.a(LibraryTest.o)
      cv::ORB::~ORB() in libLibraryTest.a(LibraryTest.o)
      non-virtual thunk to cv::ORB::~ORB() in libLibraryTest.a(LibraryTest.o)
      cv::ORB::~ORB() in libLibraryTest.a(LibraryTest.o)
      non-virtual thunk to cv::ORB::~ORB() in libLibraryTest.a(LibraryTest.o)
      cv::Feature2D::~Feature2D() in libLibraryTest.a(LibraryTest.o)
      cv::Feature2D::~Feature2D() in libLibraryTest.a(LibraryTest.o)
      ...
  "cv::FeatureDetector::empty() const", referenced from:
      construction vtable for cv::Feature2D-in-cv::ORB in libLibraryTest.a(LibraryTest.o)
      construction vtable for cv::FeatureDetector-in-cv::ORB in libLibraryTest.a(LibraryTest.o)
      vtable for cv::Feature2D in libLibraryTest.a(LibraryTest.o)
      construction vtable for cv::FeatureDetector-in-cv::Feature2D in libLibraryTest.a(LibraryTest.o)
  "cv::FeatureDetector::detect(cv::Mat const&, std::__1::vector<cv::KeyPoint, std::__1::allocator<cv::KeyPoint> >&, cv::Mat const&) const", referenced from:
      -[LibraryTest processImage:] in libLibraryTest.a(LibraryTest.o)
  "cv::DescriptorExtractor::empty() const", referenced from:
      construction vtable for cv::Feature2D-in-cv::ORB in libLibraryTest.a(LibraryTest.o)
      construction vtable for cv::DescriptorExtractor-in-cv::ORB in libLibraryTest.a(LibraryTest.o)
      vtable for cv::Feature2D in libLibraryTest.a(LibraryTest.o)
      construction vtable for cv::DescriptorExtractor-in-cv::Feature2D in libLibraryTest.a(LibraryTest.o)
  "cv::DescriptorExtractor::compute(cv::Mat const&, std::__1::vector<cv::KeyPoint, std::__1::allocator<cv::KeyPoint> >&, cv::Mat&) const", referenced from:
      -[LibraryTest processImage:] in libLibraryTest.a(LibraryTest.o)
  "cv::Algorithm::write(cv::FileStorage&) const", referenced from:
      construction vtable for cv::Feature2D-in-cv::ORB in libLibraryTest.a(LibraryTest.o)
      construction vtable for cv::FeatureDetector-in-cv::ORB in libLibraryTest.a(LibraryTest.o)
      construction vtable for cv::DescriptorExtractor-in-cv::ORB in libLibraryTest.a(LibraryTest.o)
      vtable for cv::Feature2D in libLibraryTest.a(LibraryTest.o)
      construction vtable for cv::FeatureDetector-in-cv::Feature2D in libLibraryTest.a(LibraryTest.o)
      construction vtable for cv::DescriptorExtractor-in-cv::Feature2D in libLibraryTest.a(LibraryTest.o)
  "typeinfo for cv::FeatureDetector", referenced from:
      construction vtable for cv::FeatureDetector-in-cv::ORB in libLibraryTest.a(LibraryTest.o)
      typeinfo for cv::Feature2D in libLibraryTest.a(LibraryTest.o)
      construction vtable for cv::FeatureDetector-in-cv::Feature2D in libLibraryTest.a(LibraryTest.o)
  "typeinfo for cv::DescriptorExtractor", referenced from:
      construction vtable for cv::DescriptorExtractor-in-cv::ORB in libLibraryTest.a(LibraryTest.o)
      typeinfo for cv::Feature2D in libLibraryTest.a(LibraryTest.o)
      construction vtable for cv::DescriptorExtractor-in-cv::Feature2D in libLibraryTest.a(LibraryTest.o)
  "VTT for cv::ORB", referenced from:
      -[LibraryTest processImage:] in libLibraryTest.a(LibraryTest.o)
      cv::ORB::~ORB() in libLibraryTest.a(LibraryTest.o)
      non-virtual thunk to cv::ORB::~ORB() in libLibraryTest.a(LibraryTest.o)
      cv::ORB::~ORB() in libLibraryTest.a(LibraryTest.o)
      non-virtual thunk to cv::ORB::~ORB() in libLibraryTest.a(LibraryTest.o)
  "non-virtual thunk to cv::DescriptorExtractor::~DescriptorExtractor()", referenced from:
      construction vtable for cv::DescriptorExtractor-in-cv::ORB in libLibraryTest.a(LibraryTest.o)
      construction vtable for cv::DescriptorExtractor-in-cv::Feature2D in libLibraryTest.a(LibraryTest.o)
  "non-virtual thunk to cv::DescriptorExtractor::~DescriptorExtractor()", referenced from:
      construction vtable for cv::DescriptorExtractor-in-cv::ORB in libLibraryTest.a(LibraryTest.o)
      construction vtable for cv::DescriptorExtractor-in-cv::Feature2D in libLibraryTest.a(LibraryTest.o)
  "_cvCvtColor", referenced from:
      -[LibraryTest processImage:] in libLibraryTest.a(LibraryTest.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

error MT5202: Native linking failed. Please review the build log.
  at MonoTouch.Application.NativeLink () [0x00000] in <filename unknown>:0 
  at MonoTouch.Application.BuildApp () [0x00000] in <filename unknown>:0 
  at MonoTouch.Application.Build () [0x00000] in <filename unknown>:0 
  at MTouch.Main2 (System.String[] args) [0x00000] in <filename unknown>:0 
  at MTouch.Main (System.String[] args) [0x00000] in <filename unknown>:0 

---------------------- Done ----------------------

Build: 1 error, 4 warnings
==================================================================================================
However I can send you the entire project I’m using for test.
Some explanation:

- LibraryTest is the native library. It requires the opencv framework. Download it from here http://sourceforge.net/projects/opencvlibrary/files/opencv-ios/2.4.6/opencv2.framework.zip/download and add opencv file (the bing one) to the frameworks for compilation. The makefile (make all) create the fat file.

- Test1 is the solution with sample app and LibraryTest binding project.
Comment 2 Sebastien Pouliot 2013-10-10 20:30:27 UTC
I do not see anything in the above log (or LinkWith attribute) that indicates that the opencv framework is being linked into the application. 

Without including the *external* (not Apple provided) framework it's normal for the native linker library to report it's symbols as missing (if they are used).

I'll assume the real question is why ? 

That's because creating a static library that refers to a framework it does not include it inside the static library itself. IOW the final application still needs to reference the framework.
Comment 3 Sebastien Pouliot 2013-10-10 20:59:46 UTC
[assembly: LinkWith ("libLibraryTest.a", LinkTarget.ArmV7s | LinkTarget.ArmV7 | LinkTarget.Simulator, ForceLoad = true, Frameworks="Foundation Accelerate CoreGraphics AssetsLibrary AVFoundation CoreImage CoreMedia CoreVideo QuartzCore opencv2", LinkerFlags = "-F/Users/poupou/Downloads/ -stdlib=libc++ -ObjC -lc++ ")]

^ updating the [LinkWith] to

* add `opencv2` to the list of Frameworks
* add `-Fdirectory` to specify where frameworks can be found

will allow the application to build without a native linker error (since it will find everything it needs).
Comment 4 cristian 2013-10-11 04:08:33 UTC
Great, it works. Please add this info to the documentation, because I can't find any reference about the -F parameter.
However, thank you!