Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

imread and friends are in the imgcodecs module, so you additionally have to link that lib, also you need the core library:

g++ opencv.cpp -L/Desktop/opencv-build  -lopencv_imgcodecs -lopencv_highgui -lopencv_imgproc -lopencv_core -o ocvccode

then i guess, that you need some dependancy libs (at the end of the list), like:

-llibpng -llibjpeg -llibtiff -llibwebp -llibjasper -lz

don't forget, that with static linking, the order matters, e.g anything depending on zlib must go before zlib