I've looked around for previous questions to no avail. I'm new to C++ and this may be just a headers issue, but right now building my project I get entire files of methods which utilize a certain type (vector<vector<Point>>) as undefined. In the debugger it says there is an allocator as part of the type, I was wondering if this is normal and fine or part of the problem? All my code can be found at http://ift.tt/1jRSyWc.
**** Build of configuration Default for project openscan ****
make all
g++ -g -Wall -std=c++11 -cpp main.cpp
/tmp/ccI6X5YA.o: In function `tostr[abi:cxx11](Cnts)':
/home/ryanpeach/Documents/Workspace/openscan/main.cpp:30: undefined reference to `centroid(std::vector<std::vector<cv::Point_<int>, std::allocator<cv::Point_<int> > >, std::allocator<std::vector<cv::Point_<int>, std::allocator<cv::Point_<int> > > > >)'
makefile:18: recipe for target 'main.o' failed
/tmp/ccI6X5YA.o: In function `testGeometry()':
/home/ryanpeach/Documents/Workspace/openscan/main.cpp:86: undefined reference to `Fp::Fp(std::vector<std::vector<cv::Point_<int>, std::allocator<cv::Point_<int> > >, std::allocator<std::vector<cv::Point_<int>, std::allocator<cv::Point_<int> > > > >)'
/home/ryanpeach/Documents/Workspace/openscan/main.cpp:87: undefined reference to `Fp::Fp(std::vector<std::vector<cv::Point_<int>, std::allocator<cv::Point_<int> > >, std::allocator<std::vector<cv::Point_<int>, std::allocator<cv::Point_<int> > > > >)'
/home/ryanpeach/Documents/Workspace/openscan/main.cpp:88: undefined reference to `Fp::Fp(std::vector<std::vector<cv::Point_<int>, std::allocator<cv::Point_<int> > >, std::allocator<std::vector<cv::Point_<int>, std::allocator<cv::Point_<int> > > > >)'
/home/ryanpeach/Documents/Workspace/openscan/main.cpp:96: undefined reference to `allSameLength(std::vector<cv::Point_<int>, std::allocator<cv::Point_<int> > >, int)'
/home/ryanpeach/Documents/Workspace/openscan/main.cpp:97: undefined reference to `allSameLength(std::vector<cv::Point_<int>, std::allocator<cv::Point_<int> > >, int)'
/home/ryanpeach/Documents/Workspace/openscan/main.cpp:100: undefined reference to `allInside(std::vector<cv::Point_<int>, std::allocator<cv::Point_<int> > >, std::vector<Fp, std::allocator<Fp> >)'
/home/ryanpeach/Documents/Workspace/openscan/main.cpp:101: undefined reference to `allInside(std::vector<cv::Point_<int>, std::allocator<cv::Point_<int> > >, std::vector<Fp, std::allocator<Fp> >)'
/home/ryanpeach/Documents/Workspace/openscan/main.cpp:104: undefined reference to `std::__cxx11::list<cv::Point_<int>, std::allocator<cv::Point_<int> > > rotateLst<cv::Point_<int> >(std::__cxx11::list<cv::Point_<int>, std::allocator<cv::Point_<int> > >)'
/home/ryanpeach/Documents/Workspace/openscan/main.cpp:105: undefined reference to `std::vector<cv::Point_<int>, std::allocator<cv::Point_<int> > > rotateVec<cv::Point_<int> >(std::vector<cv::Point_<int>, std::allocator<cv::Point_<int> > >)'
/home/ryanpeach/Documents/Workspace/openscan/main.cpp:106: undefined reference to `rotateCnt(std::vector<cv::Point_<int>, std::allocator<cv::Point_<int> > >)'
/home/ryanpeach/Documents/Workspace/openscan/main.cpp:111: undefined reference to `centroid(std::vector<cv::Point_<int>, std::allocator<cv::Point_<int> > >)'
/home/ryanpeach/Documents/Workspace/openscan/main.cpp:112: undefined reference to `centroid(std::vector<std::vector<cv::Point_<int>, std::allocator<cv::Point_<int> > >, std::allocator<std::vector<cv::Point_<int>, std::allocator<cv::Point_<int> > > > >)'
/home/ryanpeach/Documents/Workspace/openscan/main.cpp:113: undefined reference to `centroid(Cnts)'
/home/ryanpeach/Documents/Workspace/openscan/main.cpp:114: undefined reference to `centroid(std::vector<Fp, std::allocator<Fp> >)'
/home/ryanpeach/Documents/Workspace/openscan/main.cpp:117: undefined reference to `dist(cv::Point_<int>, cv::Point_<int>)'
/home/ryanpeach/Documents/Workspace/openscan/main.cpp:118: undefined reference to `angle(cv::Point_<int>, cv::Point_<int>)'
/home/ryanpeach/Documents/Workspace/openscan/main.cpp:119: undefined reference to `angle(cv::Point_<int>, cv::Point_<int>, cv::Point_<int>)'
/home/ryanpeach/Documents/Workspace/openscan/main.cpp:122: undefined reference to `isPoly(std::vector<cv::Point_<int>, std::allocator<cv::Point_<int> > >, int, bool, double, double)'
/home/ryanpeach/Documents/Workspace/openscan/main.cpp:123: undefined reference to `isPoly(std::vector<cv::Point_<int>, std::allocator<cv::Point_<int> > >, int, bool, double, double)'
/home/ryanpeach/Documents/Workspace/openscan/main.cpp:124: undefined reference to `isPoly(std::vector<cv::Point_<int>, std::allocator<cv::Point_<int> > >, int, bool, double, double)'
/home/ryanpeach/Documents/Workspace/openscan/main.cpp:127: undefined reference to `isRectangle(std::vector<cv::Point_<int>, std::allocator<cv::Point_<int> > >, bool, double, double)'
/home/ryanpeach/Documents/Workspace/openscan/main.cpp:128: undefined reference to `isSquare(std::vector<cv::Point_<int>, std::allocator<cv::Point_<int> > >, double, double)'
/home/ryanpeach/Documents/Workspace/openscan/main.cpp:131: undefined reference to `hasRectangle(std::vector<Fp, std::allocator<Fp> >, double, double)'
/home/ryanpeach/Documents/Workspace/openscan/main.cpp:132: undefined reference to `hasRectangle(std::vector<Fp, std::allocator<Fp> >, double, double)'
/home/ryanpeach/Documents/Workspace/openscan/main.cpp:135: undefined reference to `angles(std::vector<cv::Point_<int>, std::allocator<cv::Point_<int> > >)'
/home/ryanpeach/Documents/Workspace/openscan/main.cpp:136: undefined reference to `dists(std::vector<cv::Point_<int>, std::allocator<cv::Point_<int> > >)'
/home/ryanpeach/Documents/Workspace/openscan/main.cpp:139: undefined reference to `bool contains<cv::Point_<int> >(std::__cxx11::list<cv::Point_<int>, std::allocator<cv::Point_<int> > >, cv::Point_<int>)'
/home/ryanpeach/Documents/Workspace/openscan/main.cpp:140: undefined reference to `bool contains<cv::Point_<int> >(std::vector<cv::Point_<int>, std::allocator<cv::Point_<int> > >, cv::Point_<int>)'
/home/ryanpeach/Documents/Workspace/openscan/main.cpp:141: undefined reference to `bool contains<cv::Point_<int> >(std::__cxx11::list<cv::Point_<int>, std::allocator<cv::Point_<int> > >, cv::Point_<int>)'
/home/ryanpeach/Documents/Workspace/openscan/main.cpp:142: undefined reference to `bool contains<cv::Point_<int> >(std::vector<cv::Point_<int>, std::allocator<cv::Point_<int> > >, cv::Point_<int>)'
/home/ryanpeach/Documents/Workspace/openscan/main.cpp:146: undefined reference to `int index<cv::Point_<int> >(std::__cxx11::list<cv::Point_<int>, std::allocator<cv::Point_<int> > >, cv::Point_<int>)'
/tmp/ccI6X5YA.o: In function `cv::String::String(char const*)':
/usr/local/include/opencv2/core/cvstd.hpp:623: undefined reference to `cv::String::allocate(unsigned long)'
/tmp/ccI6X5YA.o: In function `cv::String::~String()':
/usr/local/include/opencv2/core/cvstd.hpp:665: undefined reference to `cv::String::deallocate()'
collect2: error: ld returned 1 exit status
make: *** [main.o] Error 1
Aucun commentaire:
Enregistrer un commentaire