change Makefile:
LIBRARIES += glog gflags protobuf leveldb snappy
lmdb boost_system hdf5_hl hdf5 m
opencv_core opencv_highgui opencv_imgproc
add :opencv_imgcodecs solve my problem
(1)是Makefile!不是Makefile.config
(2)有可能要先make clean 一下,再重新编译一次