Quantcast
Channel: OpenCV Q&A Forum - Latest question feed
Viewing all articles
Browse latest Browse all 19555

Linking ThinPlateSplineShapeTransformer failed (undefined reference)

$
0
0
Hi all, I built OpenCV 3.1.0-dev (latest by today) and installed it to a subdir of my home dir. Now, I want to compile a simple example cpp-file, using my freshly installed OpenCV #include #include #include #include #include #include int main() { auto tps = cv::createThinPlateSplineShapeTransformer(); std::vector sourceP, targetP; sourceP.push_back(cv::Point2f(0, 0)); targetP.push_back(cv::Point2f(100, 0)); sourceP.push_back(cv::Point2f(799, 0)); targetP.push_back(cv::Point2f(799, 0)); sourceP.push_back(cv::Point2f(0, 599)); targetP.push_back(cv::Point2f(0, 599)); sourceP.push_back(cv::Point2f(799, 599)); targetP.push_back(cv::Point2f(799, 599)); std::vector matches; for (int i = 0; i < sourceP.size(); ++i) matches.push_back(cv::DMatch(i, i, 0)); return 0; } with the following Makefile try: try.cpp g++ -ggdb -std=c++11 `pkg-config --cflags --libs ../install/lib/pkgconfig/opencv.pc` try.cpp -o try `install` is the directory, where I installed the opencv, it contains `include`, `lib`, `share` and others `try.cpp` is the code snippet The error I'm getting is as follows: asalle@azazaz:~/opencv/try$ make g++ -ggdb -std=c++11 `pkg-config --cflags --libs ../install/lib/pkgconfig/opencv.pc` try.cpp -o try /tmp/ccncYN0U.o: In function `main': /home/asalle/opencv/try/try.cpp:10: undefined reference to `cv::createThinPlateSplineShapeTransformer(double)' collect2: error: ld returned 1 exit status make: *** [try] Error 1 I already tried g++ -std=c++11 -I../install/include -L../install/lib/ -lopencv_shape try.cpp -o try but with no success. Any help will be appreciated, Asalle

Viewing all articles
Browse latest Browse all 19555

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>