G++ -v -Wall -o display_image display_image.cpp -I/usr/local/include -I/usr/local/include/opencv -L/usr/local/lib -lopencv_core -lopencv_highguiĬOLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapperĬonfigured with. usr/local/lib/libopencv_calib3d.so /usr/local/lib/libopencv_contrib.so /usr/local/lib/libopencv_core.so /usr/local/lib/libopencv_features2d.so /usr/local/lib/libopencv_flann.so /usr/local/lib/libopencv_gpu.so /usr/local/lib/libopencv_highgui.so /usr/local/lib/libopencv_imgproc.so /usr/local/lib/libopencv_legacy.so /usr/local/lib/libopencv_ml.so /usr/local/lib/libopencv_nonfree.so /usr/local/lib/libopencv_objdetect.so /usr/local/lib/libopencv_photo.so /usr/local/lib/libopencv_stitching.so /usr/local/lib/libopencv_ts.so /usr/local/lib/libopencv_video.so /usr/local/lib/libopencv_videostab.soĪdding now a more verbose compilation output (with -Wall and -v) I/usr/local/include/opencv -I/usr/local/include ,since all the libraries and headers are exactly where they are supposed to be.Īny kind of help would be repaid with my eternal love and gratitude.Īdding the echo of some commands to clarify the question: I have found some other questions that where related to mine,but none of their solutions worked out for me.And I would really like to understand what is causing these $(CC) -o $, std::allocator > const&, int)'ĭisplay_image.cpp:(.text+0x13f): undefined reference to `cv::namedWindow(std::basic_string, std::allocator > const&, int)'ĭisplay_image.cpp:(.text+0x1a1): undefined reference to `cv::imshow(std::basic_string, std::allocator > const&, cv::_InputArray const&)' LIBS = -L/usr/local/lib -lopencv_core -lopencv_highgui INCLUDE = -I/usr/local/include -I/usr/local/include/opencv III- Using my own makefile and adding the library and header paths directly: Gcc `pkg-config -cflags opencv` display_image.cpp `pkg-config -libs opencv` -o DisplayImage I- Using CMake,as instructed by the documentation site
0 Comments
Leave a Reply. |