0

So I am cross compiling an opencv application on Windows for a linux arm os.

  • I am using the newest linaro toolchain with Eclipse.

  • I have built opencv on the target OS and taken the built libs to put them in linaro's libraries.

  • Compilation and link of my application works on the target OS.

  • Compilation works with Eclipse, however link fails for some particular opencv function in the highgui library:

errors during link process:

main.cpp:79: undefined reference to `cv::imread(std::string const&, int)'
main.cpp:235: undefined reference to `cv::putText(cv::Mat&, std::string const&, cv::Point_<int>, int, double, cv::Scalar_<double>, int, int, bool)'
main.cpp:237: undefined reference to `cv::putText(cv::Mat&, std::string const&, cv::Point_<int>, int, double, cv::Scalar_<double>, int, int, bool)'

Please note: I am using many other opencv functions found in other libraries which compile and link fine (I tested by commenting the three lines associated with the error and recompiling). Even some functions present on the highgui library link fine... So the problem seems to come from specific functions in the highgui library.

I am sure I am using the same libraries than the ones used on the target arm OS, with the same compilation parameters which work on the target OS.

I have seen some other posts about this (Cross compiling opencv app, undefined reference to), but found no solution.

Would you have any ideas? Thanks!

Community
  • 1
  • 1

1 Answers1

0

Well I just used different libraries with Eclipse which I found here https://github.com/Nolaan/libopencv_24 instead, and it works. Odd problem.