Guest User

Untitled

a guest
Jun 22nd, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.14 KB | None | 0 0
  1. g++ -O3 -std=c++11 `pkg-config --cflags --libs tesseract opencv` my_first.cpp -o my_first
  2.  
  3. cmake_minimum_required(VERSION 2.6)
  4. add_compile_options(-std=c++11)
  5. project (my_first)
  6.  
  7. find_package(PkgConfig REQUIRED)
  8. pkg_check_modules (OPENCV REQUIRED opencv)
  9. link_directories(${OPENCV_LIBRARY_DIRS})
  10.  
  11. pkg_check_modules (TESSERACT REQUIRED tesseract)
  12. link_directories(${TESSERACT_LIBRARY_DIRS})
  13.  
  14. add_executable(myfirst my_first.cpp)
  15.  
  16. /usr/local/Cellar/cmake/3.11.3/bin/cmake --build
  17. /Users/ggovindan/tessaract_ocr/tesseract/experiments/cmake-build-debug --target all -- -j 4
  18. [ 50%] Linking CXX executable myfirst
  19. Undefined symbols for architecture x86_64:
  20. "cv::Mat::deallocate()", referenced from:
  21. cv::Mat::release() in my_first.cpp.o
  22. "cv::String::deallocate()", referenced from:
  23. cv::String::~String() in my_first.cpp.o
  24. cv::String::operator=(cv::String const&) in my_first.cpp.o
  25. "cv::String::allocate(unsigned long)", referenced from:
  26. cv::String::String(std::__1::basic_string<char,
  27. std::__1::char_traits<char>, std::__1::allocator<char> > const&) in
  28. my_first.cpp.o
  29. "cv::imread(cv::String const&, int)", referenced from:
  30. _main in my_first.cpp.o
  31. "cv::fastFree(void*)", referenced from:
  32. cv::Mat::~Mat() in my_first.cpp.o
  33. "tesseract::TessBaseAPI::GetUTF8Text()", referenced from:
  34. _main in my_first.cpp.o
  35. "tesseract::TessBaseAPI::SetPageSegMode(tesseract::PageSegMode)", referenced from:
  36. _main in my_first.cpp.o
  37. "tesseract::TessBaseAPI::Init(char const*, char const*,
  38. tesseract::OcrEngineMode, char**, int, GenericVector<STRING> const*,
  39. GenericVector<STRING> const*, bool)", referenced from:
  40. tesseract::TessBaseAPI::Init(char const*, char const*,
  41. tesseract::OcrEngineMode) in my_first.cpp.o
  42. "tesseract::TessBaseAPI::SetImage(unsigned char const*, int, int, int, int)", referenced from:
  43. _main in my_first.cpp.o
  44. "tesseract::TessBaseAPI::TessBaseAPI()", referenced from:
  45. _main in my_first.cpp.o
  46. ld: symbol(s) not found for architecture x86_64
  47. clang: error: linker command failed with exit code 1 (use -v to see
  48. invocation)
  49. make[2]: *** [myfirst] Error 1
  50. make[1]: *** [CMakeFiles/myfirst.dir/all] Error 2
  51. make: *** [all] Error 2
Add Comment
Please, Sign In to add comment