在Ubuntu上编译ARM的openCV
我一直试图在我的ubunto机器上编译openCV for arm。 当我编译为武装我得到下面的链接错误:uiEscoreDrv.o:在函数main': uiEscoreDrv.cpp:(.text+0x2a8): undefined reference to
cv :: namedWindow(std :: string const&,int)' uiEscoreDrv.cpp :(。text + 0x33c):对cv::_InputArray::_InputArray(cv::Mat const&)' uiEscoreDrv.cpp:(.text+0x34c): undefined reference to
cv :: _ OutputArray :: _ OutputArray (cv :: Mat&)'uiEscoreDrv.cpp :(。text + 0x390):未定义引用cv::_InputArray::_InputArray(cv::Mat const&)' uiEscoreDrv.cpp:(.text+0x3a0): undefined reference to
cv :: imshow(std :: string const&,cv :: _ InputArray const&)'uiEscoreDrv.cpp :(。text + 0x4de):未定义的引用cv::destroyWindow(std::string const&)' uiEscoreDrv.o: In function
displayCoreOutput(escore_output&)':uiEscoreDrv.cpp :(。text + 0x1304):未定义的引用cv::putText(cv::Mat&, std::string const&, cv::Point_<int>, int, double, cv::Scalar_<double>, int, int, bool)' uiEscoreDrv.cpp:(.text+0x1358): undefined reference to
cv :: putText的cv::putText(cv::Mat&, std::string const&, cv::Point_<int>, int, double, cv::Scalar_<double>, int, int, bool)' uiEscoreDrv.cpp:(.text+0x1358): undefined reference to
(cv :: Mat&,std :: 字符串const&,cv :: Point_,int,double,cv :: Scalar_,int,int,bool)'uiEscoreDrv.cpp :(。text + 0x13ac):未定义的引用cv::putText(cv::Mat&, std::string const&, cv::Point_<int>, int, double, cv::Scalar_<double>, int, int, bool)' uiEscoreDrv.cpp:(.text+0x1452): undefined reference to
cv :: putText cv :: Mat&,std :: string const&,cv :: Point_,int,double,cv :: Scalar_,int,int,bool)'uiEscoreDrv.cpp :(。text + 0x1482):未定义的引用cv::_InputArray::_InputArray(cv::Mat const&)' uiEscoreDrv.cpp:(.text+0x1492): undefined reference to
cv :: imshow的cv::_InputArray::_InputArray(cv::Mat const&)' uiEscoreDrv.cpp:(.text+0x1492): undefined reference to
(std :: string const&,cv :: InputArray const&)'uiEscoreDrv.o:在函数displayAnalytics(escore_output&)': uiEscoreDrv.cpp:(.text+0x1b44): undefined reference to
cv :: rectangle的displayAnalytics(escore_output&)': uiEscoreDrv.cpp:(.text+0x1b44): undefined reference to
(cv :: Mat&,cv :: Point,cv :: Point_,cv :: Scalar_ const&,int,int,int )'uiEscoreDrv.cpp :(。text + 0x1be0):对cv::putText(cv::Mat&, std::string const&, cv::Point_<int>, int, double, cv::Scalar_<double>, int, int, bool)' uiEscoreDrv.cpp:(.text+0x1cb6): undefined reference to
未定义引用cv::putText(cv::Mat&, std::string const&, cv::Point_<int>, int, double, cv::Scalar_<double>, int, int, bool)' uiEscoreDrv.cpp:(.text+0x1cb6): undefined reference to
cv::putText(cv::Mat&, std::string const&, cv::Point_<int>, int, double, cv::Scalar_<double>, int, int, bool)' uiEscoreDrv.cpp:(.text+0x1cb6): undefined reference to
CV ::矩形(CV ::垫及,CV :: Point_,CV :: Point_,CV :: Scalar_常量&,INT,INT,INT)” uiEscoreDrv.cpp :(文本+ 0x1e58):未定义参考cv::rectangle(cv::Mat&, cv::Point_<int>, cv::Point_<int>, cv::Scalar_<double> const&, int, int, int)' uiEscoreDrv.cpp:(.text+0x1e88): undefined reference to
cv :: _ InputArray :: _ InputArray(cv :: Mat const&)'uiEscoreDrv.cpp(.text + 0x1e98)的未定义引用:未定义对`cv :: imshow(std :: string const&,cv :: _InputArray const&)'collect2:error:ld返回1退出状态
当我编译到正规的Linux,我没有得到这个问题。
我已经完成了以下所有步骤:http://docs.opencv.org/2.4/doc/tutorials/introduction/crosscompilation/arm_crosscompile_with_cmake.html
我将下面的代码添加到了我的Makefile中:LDFLAGS + = -L./ -L / usr / local / lib -lutils pkg-config --cflags --libs --static opencv
编译完成后,我完成了以下步骤:cd / usr / local / lib sudo cp -rf /home/user/eyeSight_projects/opencv-3.2.0/platforms/linux/build_hardfp/install/lib/*。
但我仍然收到这个错误...
任何想法可能是错误的?
谢谢,奥伦
这是一个编译问题:-)我没有将-I添加到编译行中:
LOCAL_INCLUDE_FLAGS = -I / usr / local / include -I ../../api/ -I ../../ $(CROSS_COMPILE)g ++ -std = c ++ 11 -lsdtc ++ -fPIC -c -o uiEscoreDrv。 o -fPIC $(CFLAGS)$(LOCAL_INCLUDE_FLAGS)uiEscoreDrv.cpp
链接地址: http://www.djcxy.com/p/95155.html