GithubHelp home page GithubHelp logo

Make Error about multitarget-tracker HOT 6 CLOSED

xray1111 avatar xray1111 commented on August 16, 2024
Make Error

from multitarget-tracker.

Comments (6)

Nuzhny007 avatar Nuzhny007 commented on August 16, 2024

Hi!
Now you can set in CMake USE_OCV_KCF=OFF and in file track.h write:
#if USE_OCV_KCF #include <opencv2/tracking.hpp> #endif
And I will create pull request with this fix.

from multitarget-tracker.

xray1111 avatar xray1111 commented on August 16, 2024

Thanks for kindly advice! I'm trying to recompile my opencv and adding opencv_contrib, the compiling process is very slow. Let's see if it can solve this problem.

from multitarget-tracker.

xray1111 avatar xray1111 commented on August 16, 2024

After several hours of waiting I finally re-compiled opencv3.2.0 with opencv_contrib modules, then I try to make Mutitarget-tracker again, but this time it shows another error:

yangxw@ubuntu-01:~/xiaoren/Multitarget-tracker/build$ make
Scanning dependencies of target MultitargetTracker
[  2%] Building CXX object CMakeFiles/MultitargetTracker.dir/main.cpp.o
[  4%] Building CXX object CMakeFiles/MultitargetTracker.dir/Detector/Detector.cpp.o
[  7%] Building CXX object CMakeFiles/MultitargetTracker.dir/Detector/BackgroundSubtract.cpp.o
[  9%] Building CXX object CMakeFiles/MultitargetTracker.dir/Detector/vibe_src/vibe.cpp.o
[ 12%] Building CXX object CMakeFiles/MultitargetTracker.dir/Tracker/Ctracker.cpp.o
[ 14%] Building CXX object CMakeFiles/MultitargetTracker.dir/Tracker/HungarianAlg/HungarianAlg.cpp.o
[ 17%] Building CXX object CMakeFiles/MultitargetTracker.dir/Tracker/LocalTracker.cpp.o
[ 19%] Building CXX object CMakeFiles/MultitargetTracker.dir/Tracker/Kalman.cpp.o
In file included from /home/yangxw/xiaoren/Multitarget-tracker/Tracker/Kalman.cpp:1:0:
/home/yangxw/xiaoren/Multitarget-tracker/Tracker/Kalman.h:34:10: error: ‘unique_ptr’ in namespace ‘std’ does not name a template type
     std::unique_ptr<cv::KalmanFilter> m_linearKalman;
          ^
/home/yangxw/xiaoren/Multitarget-tracker/Tracker/Kalman.cpp: In member function ‘void TKalmanFilter::CreateLinear(Point_t, Point_t)’:
/home/yangxw/xiaoren/Multitarget-tracker/Tracker/Kalman.cpp:55:5: error: ‘m_linearKalman’ was not declared in this scope
     m_linearKalman = std::make_unique<cv::KalmanFilter>(4, 2, 0);
     ^
/home/yangxw/xiaoren/Multitarget-tracker/Tracker/Kalman.cpp:55:22: error: ‘make_unique’ is not a member of ‘std’
     m_linearKalman = std::make_unique<cv::KalmanFilter>(4, 2, 0);
                      ^
/home/yangxw/xiaoren/Multitarget-tracker/Tracker/Kalman.cpp:55:55: error: expected primary-expression before ‘>’ token
     m_linearKalman = std::make_unique<cv::KalmanFilter>(4, 2, 0);
                                                       ^
/home/yangxw/xiaoren/Multitarget-tracker/Tracker/Kalman.cpp:55:60: warning: left operand of comma operator has no effect [-Wunused-value]
     m_linearKalman = std::make_unique<cv::KalmanFilter>(4, 2, 0);
                                                            ^
......

Do I miss some other packages? Thanks! @Nuzhny007

from multitarget-tracker.

xray1111 avatar xray1111 commented on August 16, 2024

I just added a line in Kalman.h to solve the above problem:
include <memory>
But still there is one last problem when linking executable:

......
[ 92%] Building CXX object CMakeFiles/MultitargetTracker.dir/Tracker/graph/GTL/src/ratio_cut_partition.cpp.o
[ 95%] Building CXX object CMakeFiles/MultitargetTracker.dir/Tracker/graph/GTL/src/st_number.cpp.o
[ 97%] Building CXX object CMakeFiles/MultitargetTracker.dir/Tracker/graph/GTL/src/topsort.cpp.o
[100%] Linking CXX executable MultitargetTracker
/usr/bin/ld: warning: libiconv.so.2, needed by //home/yangxw/anaconda3/lib/libgobject-2.0.so.0, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libpcre.so.1, needed by //home/yangxw/anaconda3/lib/libgobject-2.0.so.0, not found (try using -rpath or -rpath-link)
/usr/local/lib/libopencv_tracking.so.3.2.0: undefined reference to `GOMP_parallel@GOMP_4.0'
//home/yangxw/anaconda3/lib/libglib-2.0.so.0: undefined reference to `libiconv_open'
//home/yangxw/anaconda3/lib/libglib-2.0.so.0: undefined reference to `libiconv_close'
//home/yangxw/anaconda3/lib/libglib-2.0.so.0: undefined reference to `libiconv'
collect2: error: ld returned 1 exit status
CMakeFiles/MultitargetTracker.dir/build.make:1163: recipe for target 'MultitargetTracker' failed
make[2]: *** [MultitargetTracker] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/MultitargetTracker.dir/all' failed
make[1]: *** [CMakeFiles/MultitargetTracker.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

I remember that when I compile opencv, I add an option 'WITH_OPENMP=ON', and the opencv compiled successfully, am I making a mistake?

from multitarget-tracker.

Nuzhny007 avatar Nuzhny007 commented on August 16, 2024

I compile only under Ubuntu 16.04 and don't have this problem.
You can run cmake with this flag: -DCMAKE_EXE_LINKER_FLAGS=-liconv

from multitarget-tracker.

xray1111 avatar xray1111 commented on August 16, 2024

The problem may be cause by anaconda python environment I installed. After re-compile opencv without python's path adding, I can compile successfully. THX!

from multitarget-tracker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.