main.cpp : (. Text + 0xd06): undefined reference to XX method | simple record

This blog post is just a record of C + + compilation and installation problems – it doesn’t give the correct solution

main.cpp:(.text+0xd06): undefined reference to `uni_text::UniText::UniText(std::string const&, int)'
main.cpp:(.text+0xe73): undefined reference to `uni_text::UniText::PutText(cv::Mat&, std::string const&, cv::Point_<int> const&, cv::Scalar_<double> const&, bool)'

Analysis:
encounter this problem: run some C + + projects that contain special so dynamic library or static library;
the compiled versions of GCC and G + + used by the native environment are not completely consistent with the libraries (dynamic library or static library) compiled by the author, resulting in these errors

1: There is no corresponding dependency (static library or dynamic library). 2: the compiled versions of some static libraries or dynamic libraries in the project are inconsistent

Solutions:

In the final analysis, it’s an environmental issue: GCC, G + + version matching or the supplement of third-party dependency


Read More: