Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Is imread necessary in the sfm module?

I would thank if someone could help me with a linkage error.

I compiled opencv with the sfm module and now I am trying to run a simple example using the command:

g++ estimate_3d_points.cpp -o estimate_3d_points -std=c++11 -I/usr/local/include/opencv4 -L/usr/local/lib -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_imgcodecs -lopencv_viz -lopencv_sfm

I have a linkage error: /usr/bin/ld: /usr/local/lib/libopencv_sfm.so: undefined reference to `cv::imread(std::__cxx11::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&, int)' collect2: error: ld returned 1 exit status

Shouldn't opencv_codecs (where imread is) and opencv_fsm be two independent packages? How do I go around this?