2017-02-16 175 views
0

我一直在嘗試在我的ubunto機器上編譯openCV for arm。 當我編譯武裝我得到以下鏈接錯誤: uiEscoreDrv.o:在功能main': uiEscoreDrv.cpp:(.text+0x2a8): undefined reference to CV :: namedWindow(的std :: string常量&,INT)」 uiEscoreDrv.cpp :(文字+ 0x33c):未定義參考cv::_InputArray::_InputArray(cv::Mat const&)' uiEscoreDrv.cpp:(.text+0x34c): undefined reference to cv :: _ OutputArray :: _ OutputArray(cv :: Mat &)' uiEscoreDrv.cpp :(。text + 0x390):undefined指向cv::_InputArray::_InputArray(cv::Mat const&)' uiEscoreDrv.cpp:(.text+0x3a0): undefined reference to cv :: imshow(std :: string const &,cv :: _ InputArray常量&) ' uiEscoreDrv.cpp :(文本+ 0x4de):未定義參照cv::destroyWindow(std::string const&)' uiEscoreDrv.o: In function displayCoreOutput(escore_output &)': uiEscoreDrv.cpp :(文本+ 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: :mat &,std :: string const &,cv :: Point_,int,double,cv :: Scalar_,int,int,bool)' uiEscoreDrv.cpp :(.text + 0x13ac):undefined指向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):undefined參照cv::_InputArray::_InputArray(cv::Mat const&)' uiEscoreDrv.cpp:(.text+0x1492): undefined reference to CV :: imshow(的std :: string常量&,CV :: InputArray常量&)」 uiEscoreDrv.o:在功能displayAnalytics(escore_output&)': uiEscoreDrv.cpp:(.text+0x1b44): undefined reference to CV ::矩形(CV ::墊&,CV ::點,CV :: Point_,cv :: Scalar_ const &,int,int,int)' uiEscoreDr v.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 :: rectangle(cv :: Mat &,cv :: Point_,cv :: Point_,cv :: Scalar_ const &,int,int,int)' (cv :: Mat const &)' uiEscoreDrv.cpp :(。text + 0x1e98):未定義的對cv的引用:(.text + 0x1e58):undefined對cv :: _ InputArray :: _ InputArray(cv :: Mat const &) :imshow(的std :: string常量&,CV :: _ InputArray常量&)」 collect2:錯誤:LD返回1個退出狀態在ubuntu上交叉編譯openCV for ARM

當我編譯到常規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/*。

,但我仍然得到這個錯誤...

任何想法可能是錯誤的?

感謝, 奧倫

回答

0

這是一個編譯問題:-) 我沒有了-I添加到編輯線:

LOCAL_INCLUDE_FLAGS = -I在/ usr /本地/包括-I .. /../api/ -I ../../ $(CROSS_COMPILE)g ++ -std = C++ 11 -lsdtC++ -fPIC -c -o uiEscoreDrv.o -fPIC $(CFLAGS)$(LOCAL_INCLUDE_FLAGS)uiEscoreDrv。cpp