woojtekr
woojtekr

Reputation: 295

Apple O-Match Linker error when trying to use Fast Corner Detector Success Labs

i am trying to implement this: http://www.hatzlaha.co.il/150842/FAST-Corner-V2 in my app. They share complete compiling project that is doing what I want. I am trying to use it in my app but I got stuck in compiling my application after copying function.

I got this error from compiler:

Ld /Users/wojciechradomski2/Library/Developer/Xcode/DerivedData/ARmgr-bxkvnxdnsjbaioahqhygfsmofpxn/Build/Products/Debug-iphoneos/ARmgr.app/ARmgr normal armv6
    cd /Users/wojciechradomski2/Documents/xCode/AR/ARmgr
    setenv IPHONEOS_DEPLOYMENT_TARGET 4.0
    setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-g++-4.2 -arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk -L/Users/wojciechradomski2/Library/Developer/Xcode/DerivedData/ARmgr-bxkvnxdnsjbaioahqhygfsmofpxn/Build/Products/Debug-iphoneos -L/Users/wojciechradomski2/Documents/xCode/AR/ARmgr/ARmgr/opencv_device/lib -F/Users/wojciechradomski2/Library/Developer/Xcode/DerivedData/ARmgr-bxkvnxdnsjbaioahqhygfsmofpxn/Build/Products/Debug-iphoneos -filelist /Users/wojciechradomski2/Library/Developer/Xcode/DerivedData/ARmgr-bxkvnxdnsjbaioahqhygfsmofpxn/Build/Intermediates/ARmgr.build/Debug-iphoneos/ARmgr.build/Objects-normal/armv6/ARmgr.LinkFileList -dead_strip -lstdc++ -lz -miphoneos-version-min=4.0 -framework OpenGLES -framework AssetsLibrary -framework MobileCoreServices -framework MediaPlayer -framework QuartzCore -framework CoreVideo -framework CoreMedia -framework AVFoundation -framework Accelerate -framework UIKit -framework Foundation -framework CoreGraphics -lcv -lcxcore -o /Users/wojciechradomski2/Library/Developer/Xcode/DerivedData/ARmgr-bxkvnxdnsjbaioahqhygfsmofpxn/Build/Products/Debug-iphoneos/ARmgr.app/ARmgr

Undefined symbols for architecture armv6:
  "fast9_detect_nonmax(unsigned char const*, int, int, int, int, int*)", referenced from:
      -[CameraViewController captureOutput:didOutputSampleBuffer:fromConnection:] in CameraViewController.o
ld: symbol(s) not found for architecture armv6
collect2: ld returned 1 exit status

As readme file says I need only to import fast.h, and I am doing it. I checked all libraries, imports and frameworks - I have them all.

The above error displays even with someting like this:

fast9_score(NULL, NULL, NULL, NULL, NULL);

After removing this line everything compiles fine.

Any ideas what I am missing or doing wrong?

Upvotes: 0

Views: 442

Answers (1)

Arne
Arne

Reputation: 2674

From my cursory glance, the missing function is defined in fast.cc. So make sure you have it in your project, and it gets compiled and linked with your desired target.

Edit: A hint: if you get missing symbols in the linker, just grep for the files which contain that symbol. You may find the one that defines it... I just did a "grep -r fast9_detect_nonmax *" in the source directory of the project you linked in your post, and found the file.

Upvotes: 2

Related Questions