When I try to run my Xcode project, it shows that linker error which I uploaded the image

343 views Asked by At

I have a QR code reader project that uses Zbar SDK, but I get this error when I try to run it:

ld: warning: directory not found for option '-L/Users/rweber/work/cornell_qr_reader/TestFlightSDK2.1.4'

enter image description here

How can I resolve this error?

2

There are 2 answers

0
Ketan Parmar On

I think you have not properly put your third party library in your xcode bundle. Your library is not properly copied i think or some file is missing in library as warning shows that directory not found.

When drag and drop your library in xcode, you get a popup, in that copy item if needed and add to targets must be checked. and create group should be also checked.

Refer this post it may helpful.

2
seggy On

For me its working

  1. Click on your project in the left sidebar

  2. Click 'Build Settings'

  3. Go to 'Other Linker Flags'

  4. Click 'Release'

  5. Change the "-force_load" value from

    this ${TARGET_BUILD_DIR}/libCordova.a

    to ${BUILT_PRODUCTS_DIR}/libCordova.a

I hope its working for you