zhengthomastang / 2018AICity_TeamUW

The winning method in Track 1 and Track 3 at the 2nd AI City Challenge Workshop in CVPR 2018 - Official Implementation
http://openaccess.thecvf.com/content_cvpr_2018_workshops/w3/html/Tang_Single-Camera_and_Inter-Camera_CVPR_2018_paper.html
550 stars 198 forks source link

collect2: error: ld returned 1 exit status` #13

Open ZIKO94ZIKO opened 4 years ago

ZIKO94ZIKO commented 4 years ago

hi @zhengthomastang thank you for sharing with us you code source and make it open-source , i have a problem when i run any main.cpp file :

ing const&, cv::_InputArray const&, std::vector<int, std::allocator<int> > const&)' /usr/bin/ld: main.cpp:(.text+0x2b2): undefined reference tocv::VideoCapture::~VideoCapture()' /usr/bin/ld: main.cpp:(.text+0x2de): undefined reference to cv::VideoCapture::~VideoCapture()' /usr/bin/ld: main.cpp:(.text+0x351): undefined reference tocv::VideoCapture::~VideoCapture()' /usr/bin/ld: /tmp/cc6mUeHV.o: in function cv::String::String(char const*)': main.cpp:(.text._ZN2cv6StringC2EPKc[_ZN2cv6StringC5EPKc]+0x4f): undefined reference tocv::String::allocate(unsigned long)' /usr/bin/ld: /tmp/cc6mUeHV.o: in function cv::String::~String()': main.cpp:(.text._ZN2cv6StringD2Ev[_ZN2cv6StringD5Ev]+0x14): undefined reference tocv::String::deallocate()' /usr/bin/ld: /tmp/cc6mUeHV.o: in function cv::Mat::~Mat()': main.cpp:(.text._ZN2cv3MatD2Ev[_ZN2cv3MatD5Ev]+0x39): undefined reference tocv::fastFree(void*)' /usr/bin/ld: /tmp/cc6mUeHV.o: in function cv::Mat::release()': main.cpp:(.text._ZN2cv3Mat7releaseEv[_ZN2cv3Mat7releaseEv]+0x4b): undefined reference tocv::Mat::deallocate()' collect2: error: ld returned 1 exit status (base) root@ZakariaUbunto:/home/zakaria/Public/2018AICity_TeamUW-master/Track1/1_VDO2IMG/src# clear

(base) root@ZakariaUbunto:/home/zakaria/Public/2018AICity_TeamUW-master/Track1/1_VDO2IMG/src# g++ main.cpp /usr/bin/ld: /tmp/ccvDSGHa.o: in function main': main.cpp:(.text+0x33): undefined reference tocv::VideoCapture::VideoCapture()' /usr/bin/ld: main.cpp:(.text+0x6c): undefined reference to cv::VideoCapture::VideoCapture(cv::String const&)' /usr/bin/ld: main.cpp:(.text+0x94): undefined reference tocv::VideoCapture::~VideoCapture()' /usr/bin/ld: main.cpp:(.text+0xb2): undefined reference to cv::VideoCapture::isOpened() const' /usr/bin/ld: main.cpp:(.text+0x131): undefined reference tovtable for cv::VideoCapture' /usr/bin/ld: main.cpp:(.text+0x256): undefined reference to cv::imwrite(cv::String const&, cv::_InputArray const&, std::vector<int, std::allocator<int> > const&)' /usr/bin/ld: main.cpp:(.text+0x2b2): undefined reference tocv::VideoCapture::~VideoCapture()' /usr/bin/ld: main.cpp:(.text+0x2de): undefined reference to cv::VideoCapture::~VideoCapture()' /usr/bin/ld: main.cpp:(.text+0x351): undefined reference tocv::VideoCapture::~VideoCapture()' /usr/bin/ld: /tmp/ccvDSGHa.o: in function cv::String::String(char const*)': main.cpp:(.text._ZN2cv6StringC2EPKc[_ZN2cv6StringC5EPKc]+0x4f): undefined reference tocv::String::allocate(unsigned long)' /usr/bin/ld: /tmp/ccvDSGHa.o: in function cv::String::~String()': main.cpp:(.text._ZN2cv6StringD2Ev[_ZN2cv6StringD5Ev]+0x14): undefined reference tocv::String::deallocate()' /usr/bin/ld: /tmp/ccvDSGHa.o: in function cv::Mat::~Mat()': main.cpp:(.text._ZN2cv3MatD2Ev[_ZN2cv3MatD5Ev]+0x39): undefined reference tocv::fastFree(void*)' /usr/bin/ld: /tmp/ccvDSGHa.o: in function cv::Mat::release()': main.cpp:(.text._ZN2cv3Mat7releaseEv[_ZN2cv3Mat7releaseEv]+0x4b): undefined reference tocv::Mat::deallocate()' collect2: error: ld returned 1 exit status`

zhengthomastang commented 4 years ago

I am not sure which package of code you are experimenting, but it is clear that OpenCV is not correctly linked to the compilation environment.

ZIKO94ZIKO commented 4 years ago

ah ok i will uninstall open cv and reinstall it ,

ZIKO94ZIKO commented 4 years ago

hi sir i have the same problem all the time please help me

ZIKO94ZIKO commented 4 years ago

i try to run Speed test