Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

installing opencv in ubuntu.

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

installing opencv in ubuntu.

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: /home/cv/Desktop/opencv-linux/opencv-2.4.11/modules/highgui/src/grfmt_jpeg.cpp:75:0: /home/cv/Desktop/opencv-linux/opencv-2.4.11/modules/highgui/src/grfmt_jpeg.cpp: In member function ‘virtual bool cv::JpegDecoder::readHeader()’: /home/cv/Desktop/opencv-linux/opencv-2.4.11/modules/highgui/src/grfmt_jpeg.cpp:226:9: error: ‘z_const’ does ‘JPEG_LIB_VERSION’ was 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, declared in this scope 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 , jpeg_create_decompress( &state->cinfo ); ^ /usr/include/zlib.h:1025:29: /home/cv/Desktop/opencv-linux/opencv-2.4.11/modules/highgui/src/grfmt_jpeg.cpp: In member function ‘virtual bool cv::JpegEncoder::write(const cv::Mat&, const std::vector<int>&)’: /home/cv/Desktop/opencv-linux/opencv-2.4.11/modules/highgui/src/grfmt_jpeg.cpp:568:5: error: two or more data types ‘JPEG_LIB_VERSION’ was not declared in declaration of ‘parameter’ typedef unsigned (in_func) OF((void FAR , this scope ^ 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 2jpeg_create_compress(&cinfo);

Many Thanks

installing opencv in ubuntu.

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:

In file included from /home/cv/Desktop/opencv-linux/opencv-2.4.11/modules/highgui/src/grfmt_jpeg.cpp:75:0: /home/cv/Desktop/opencv-linux/opencv-2.4.11/modules/highgui/src/grfmt_jpeg.cpp: /home/cv/Desktop/opencv-linux/opencv-3.0.0/modules/core/src/persistence.cpp:67: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 member function ‘virtual bool cv::JpegDecoder::readHeader()’: /home/cv/Desktop/opencv-linux/opencv-2.4.11/modules/highgui/src/grfmt_jpeg.cpp:226:9: error: ‘JPEG_LIB_VERSION’ was file included from /usr/include/zlib.h:34:0, from /home/cv/Desktop/opencv-linux/opencv-3.0.0/modules/core/src/persistence.cpp:67: /usr/include/zlib.h:1025:29: error: ‘z_const’ has not declared been declared typedef unsigned (in_func) OF((void FAR , ^ /usr/include/zlib.h:1025:29: error: two or more data types in this scope jpeg_create_decompress( &state->cinfo ); ^ /home/cv/Desktop/opencv-linux/opencv-2.4.11/modules/highgui/src/grfmt_jpeg.cpp: declaration of ‘parameter’ typedef unsigned (in_func) OF((void FAR , ^ In member function ‘virtual bool cv::JpegEncoder::write(const cv::Mat&, file included from /home/cv/Desktop/opencv-linux/opencv-3.0.0/modules/core/src/persistence.cpp:67:0: /usr/include/zlib.h:1349:32: error: expected initializer before ‘Z_ARG’ ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const std::vector<int>&)’: /home/cv/Desktop/opencv-linux/opencv-2.4.11/modules/highgui/src/grfmt_jpeg.cpp:568:5: error: ‘JPEG_LIB_VERSION’ was char *format, ...)); ^ /usr/include/zlib.h:1673:5: error: ‘z_off64_t’ does not declared in this scope jpeg_create_compress(&cinfo);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]: [modules/core/CMakeFiles/opencv_core.dir/src/persistence.cpp.o] Error 1 make[1]: [modules/core/CMakeFiles/opencv_core.dir/all] Error 2 make: ** [all] Error 2

Many Thanks