Linker error

  • 2.3K Views
  • Last Post 29 May 2013
LiveRock posted this 28 May 2013

Hi

I am using xcode 4.6.2 with Storyboards. I followed the instructions in the HELP section but before I add anything, I got LINKER error:

ld: library not found for -lAbbyyMsdk clang: error: linker command failed with exit code 1 (use -v to see invocation)

I have added labbyymsdk in the Build Phases with libstdc++.dylib Also added lib and inc in Build Settings, plus all the Resources...

What did I do wrong here?

LiveRock posted this 29 May 2013

I resolved the problem but now I can't build the included sample app to run on device... here are the errors:

Ld ./X.iPhoneSimulator.Release/Temp/Sample.build/Objects-normal/armv7/Sample normal armv7 cd /Users/peterlum/xcode_projects/MobileOCR.iPhone/Samples/iPhone 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.1.sdk -L/Users/peterlum/xcode_projects/MobileOCR.iPhone/Samples/iPhone/X.iPhoneSimulator.Release -L../../AbbyyMsdk/X.iPhoneSimulator.Release -L../../lib/iPhoneSimulator.Release -L../../lib/iPhoneSimulator -L../lib/iPhoneSimulator -F/Users/peterlum/xcode_projects/MobileOCR.iPhone/Samples/iPhone/X.iPhoneSimulator.Release -filelist /Users/peterlum/xcode_projects/MobileOCR.iPhone/Samples/iPhone/./X.iPhoneSimulator.Release/Temp/Sample.build/Objects-normal/armv7/Sample.LinkFileList -dead_strip -lAbbyyMsdk -lstdc++ -fobjc-link-runtime -miphoneos-version-min=4.3 -framework Foundation -framework UIKit -framework CoreGraphics -o /Users/peterlum/xcode_projects/MobileOCR.iPhone/Samples/iPhone/./X.iPhoneSimulator.Release/Temp/Sample.build/Objects-normal/armv7/Sample

ld: warning: directory not found for option '-L../../AbbyyMsdk/X.iPhoneSimulator.Release' ld: warning: directory not found for option '-L../../lib/iPhoneSimulator.Release' ld: warning: directory not found for option '-L../lib/iPhoneSimulator' ld: warning: ignoring file ../../lib/iPhoneSimulator/libAbbyyMsdk.a, file was built for archive which is not the architecture being linked (armv7): ../../lib/iPhoneSimulator/libAbbyyMsdk.a Undefined symbols for architecture armv7: "OBJC_CLASS$CMocrRecognitionConfiguration", referenced from: objc-class-ref in RecognitionViewController.o "_OBJC_CLASS$CMocrEngine", referenced from: objc-class-ref in RecognitionViewController.o objc-class-ref in RecognitionOperations.o "_OBJC_CLASS$CMocrLicense", referenced from: objc-class-ref in RecognitionViewController.o "_OBJC_CLASS$_CMocrDirectoryDataSource", referenced from: objc-class-ref in RecognitionViewController.o ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Ld ./X.iPhoneSimulator.Release/Temp/Sample.build/Objects-normal/armv7s/Sample normal armv7s cd /Users/peterlum/xcode_projects/MobileOCR.iPhone/Samples/iPhone 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 armv7s -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -L/Users/peterlum/xcode_projects/MobileOCR.iPhone/Samples/iPhone/X.iPhoneSimulator.Release -L../../AbbyyMsdk/X.iPhoneSimulator.Release -L../../lib/iPhoneSimulator.Release -L../../lib/iPhoneSimulator -L../lib/iPhoneSimulator -F/Users/peterlum/xcode_projects/MobileOCR.iPhone/Samples/iPhone/X.iPhoneSimulator.Release -filelist /Users/peterlum/xcode_projects/MobileOCR.iPhone/Samples/iPhone/./X.iPhoneSimulator.Release/Temp/Sample.build/Objects-normal/armv7s/Sample.LinkFileList -dead_strip -lAbbyyMsdk -lstdc++ -fobjc-link-runtime -miphoneos-version-min=4.3 -framework Foundation -framework UIKit -framework CoreGraphics -o /Users/peterlum/xcode_projects/MobileOCR.iPhone/Samples/iPhone/./X.iPhoneSimulator.Release/Temp/Sample.build/Objects-normal/armv7s/Sample

ld: warning: directory not found for option '-L../../AbbyyMsdk/X.iPhoneSimulator.Release' ld: warning: directory not found for option '-L../../lib/iPhoneSimulator.Release' ld: warning: directory not found for option '-L../lib/iPhoneSimulator' ld: warning: ignoring file ../../lib/iPhoneSimulator/libAbbyyMsdk.a, file was built for archive which is not the architecture being linked (armv7s): ../../lib/iPhoneSimulator/libAbbyyMsdk.a Undefined symbols for architecture armv7s: "OBJC_CLASS$CMocrRecognitionConfiguration", referenced from: objc-class-ref in RecognitionViewController.o "_OBJC_CLASS$CMocrEngine", referenced from: objc-class-ref in RecognitionViewController.o objc-class-ref in RecognitionOperations.o "_OBJC_CLASS$CMocrLicense", referenced from: objc-class-ref in RecognitionViewController.o "_OBJC_CLASS$_CMocrDirectoryDataSource", referenced from: objc-class-ref in RecognitionViewController.o ld: symbol(s) not found for architecture armv7s clang: error: linker command failed with exit code 1 (use -v to see invocation)

Close