Attempted compilation results of unsuccessful sample code

asked 2015-09-06 17:30:14 -0600

I am unsure where the symbol "_ZN2cv9rectangleERKNS_17_InputOutputArrayENS_6Point_IiEES4_RKNS_7Scalar_IdEEiii" comes from. This is OpenCV 3.0 from github. Is there unfinished code to make this work right, or do I need to do something else before adding the correct additions to cmake?

% g++ -o MatchTemplate_Demo MatchTemplate_Demo.cpp -g -O2 -lopencv_imgcodecs                        /usr/bin/ld: /tmp/cciu3kDK.o: undefined reference to symbol '_ZN2cv9rectangleERKNS_17_InputOutputArrayENS_6Point_IiEES4_RKNS_7Scalar_IdEEiii'

/usr/lib/libopencv_imgproc.so.3.0: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status

edit retag flag offensive close merge delete

Comments

you are linking imgcodecs, but that is simply not enough. try -lopencv_imgcodecs -lopencv_imgproc -lopencv_core -lopencv_highgui

berak gravatar imageberak ( 2015-09-07 00:48:48 -0600 )edit