Ask Your Question
0

compiling opencv2 fails ‘Z_RLE’ was not declared in this scope

asked 2013-06-10 12:20:55 -0500

flashedarling gravatar image

I'm having the following issue while running cmake_make_isolated.

~/ros_catkin_ws/src/opencv2/modules/highgui/src/grfmt_png.cpp: In member function ‘virtual bool cv::PngEncoder::write(const cv::Mat&, const std::vector<int>&)’: ~/ros_catkin_ws/src/opencv2/modules/highgui/src/grfmt_png.cpp:361:44: error: ‘Z_RLE’ was not declared in this scope ~/ros_catkin_ws/src/opencv2/modules/highgui/src/grfmt_png.cpp:374:48: error: ‘Z_FIXED’ was not declared in this scope make[2]: * [modules/highgui/CMakeFiles/opencv_highgui.dir/src/grfmt_png.cpp.o] Error 1 make[2]: Waiting for unfinished jobs.... make[1]: [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2 make[1]: * Waiting for unfinished jobs....

I did some searching and found that Z_RLE is associated with zlib, and I checked and found that it was installed and up to date

Package zlib-1.2.7-9.fc18.x86_64 already installed and latest version

rosdep didn't report any missing dependencies. What do I do to resolve this?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2013-06-12 11:15:46 -0500

flashedarling gravatar image

I found the answer myself. I had multiple copies of libz.h on my system, one of which was older and did not have the correct definitions. By reorganizing my path I was able to get the correct libz.h file to be imported.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-06-10 12:20:55 -0500

Seen: 163 times

Last updated: Jun 12 '13