1
votes

I got some issues as below while try to build Pocket-OCR

Undefined symbols for architecture i386:
"tesseract::TessBaseAPI::SetVariable(char const*, char const*)", referenced from: -[OCRDisplayViewController viewDidLoad] in OCRDisplayViewController.o
"tesseract::TessBaseAPI::TesseractRect(unsigned char const*, int, int, int, int, int, int)", referenced from: -[OCRDisplayViewController readAndProcessImage:] in OCRDisplayViewController.o -[OCRDisplayViewController threadedReadAndProcessImage:] in OCRDisplayViewController.o
"tesseract::TessBaseAPI::AllWordConfidences()", referenced from: -[OCRDisplayViewController viewDidLoad] in OCRDisplayViewController.o "tesseract::TessBaseAPI::End()", referenced from: -[OCRDisplayViewController dealloc] in OCRDisplayViewController.o "tesseract::TessBaseAPI::Init(char const*, char const*, tesseract::OcrEngineMode, char*, int, GenericVector const, GenericVector const*, bool)", referenced from: tesseract::TessBaseAPI::Init(char const*, char const*) in OCRDisplayViewController.o "tesseract::TessBaseAPI::TessBaseAPI()", referenced from: -[OCRDisplayViewController viewDidLoad] in OCRDisplayViewController.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)

What should I do to resolve this issues?

I search on goole for answer but does'n get much help to solve the issues.

3
I'm facing the exact same error. I've checked my libraries and they're at the correct location. I tried every solution given here. Non worked. :(Git.Coach

3 Answers

1
votes

you can reference this solution on SO

1
votes

I got the solution for this and also got new links and examples that are working fine and have completed my demo project

May these links are useful for others who want's to use it.

Example One

Now got the exact link from where I am able to develop my demo project.

Example Which I used

0
votes

Though the answer is already accepted I found the solution that worked for me:

Apparently xCode does not add frameworks automatically to the "Link Binary With Libraries"- and "Copy Bundle Resources"-lists.

You can find them by clicking on your projectname (blue icon) and then go to "Build Phases" and add them to both lists. Then change from "Required" to "Optional". Both can be seen in the screenshot.

enter image description here