2012/12/27 Alok Singh Mahor <[email protected]> > I am getting linker errors > alok@alok:~/exp/opencv/exp$ g++ `pkg-config --cflags opencv` `pkg-config > --libs opencv` alok.cpp > /tmp/cc7u9KXa.o: In function `main': > alok.cpp:(.text+0x67): undefined reference to `cv::imread(std::string > const&, int)' >
This is a linking problem. I believe in some versions of ubuntu linker flags have to be specified at end of compilation command Try this way: <code> g++ `pkg-config --cflags opencv` alok.cpp `pkg-config --libs opencv` </code> -- Lots o' Luv, Phani Bhushan Let not your sense of morals prevent you from doing what is right - Isaac Asimov (Salvor Hardin in Foundation and Empire) Please avoid sending me Word or PowerPoint attachments. See http://www.gnu.org/philosophy/no-word-attachments.html -- Mailing list guidelines and other related articles: http://lug-iitd.org/Footer
