Hi , i want to install opencv in ubuntu 14.04 and the opencv version are 2.4.11 or 3. i use this link: http://www.samontab.com/web/2014/06/installing-opencv-2-4-9-in-ubuntu-14-04-lts.
as manual . but i have error when make files.
the error log is:
[ 2%] Building CXX object 3rdparty/openexr/CMakeFiles/IlmImf.dir/IlmImf/ImfZipCompressor.cpp.o In file included from /home/cv/Desktop/opencv-linux/opencv-2.4.11/3rdparty/openexr/IlmImf/ImfZipCompressor.cpp:47:0: /usr/include/zlib.h:86:5: error: ‘z_const’ does not name a type z_const Bytef next_in; / next input byte / ^ /usr/include/zlib.h:94:5: error: ‘z_const’ does not name a type z_const char *msg; / last error message, NULL if no error / ^ In file included from /usr/include/zlib.h:34:0, from /home/cv/Desktop/opencv-linux/opencv-2.4.11/3rdparty/openexr/IlmImf/ImfZipCompressor.cpp:47: /usr/include/zlib.h:1025:29: error: ‘z_const’ has not been declared typedef unsigned (in_func) OF((void FAR , ^ /usr/include/zlib.h:1025:29: error: two or more data types in declaration of ‘parameter’ typedef unsigned (in_func) OF((void FAR , ^ In file included from /home/cv/Desktop/opencv-linux/opencv-2.4.11/3rdparty/openexr/IlmImf/ImfZipCompressor.cpp:47:0: /usr/include/zlib.h:1349:32: error: expected initializer before ‘Z_ARG’ ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...)); ^ /usr/include/zlib.h:1673:5: error: ‘z_off64_t’ does not name a type z_off64_t pos; ^ /usr/include/zlib.h:1748:15: error: ‘z_crc_t’ does not name a type ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table OF((void)); ^ /usr/include/zlib.h:1758:44: error: expected initializer before ‘Z_ARG’ ZEXTERN int ZEXPORTVA gzvprintf Z_ARG((gzFile file, ^ make[2]: [3rdparty/openexr/CMakeFiles/IlmImf.dir/IlmImf/ImfZipCompressor.cpp.o] Error 1 make[1]: [3rdparty/openexr/CMakeFiles/IlmImf.dir/all] Error 2 make: ** [all] Error 2
Many Thanks