hi there I am trying to compile opencv3 (latest) with CUDA 7.5 but it gives the following error
[ 86%] Built target opencv_python2
[ 86%] Built target opencv_python3 [ 86%] Building CXX object apps/traincascade/CMakeFiles/opencv_traincascade.dir/mergevec.cpp.o In file included from /home/unnirajendran/opencv/apps/traincascade/_cvcommon.h:45:0, from /home/unnirajendran/opencv/apps/traincascade/_cvhaartraining.h:51, from /home/unnirajendran/opencv/apps/traincascade/mergevec.cpp:8: /home/unnirajendran/opencv/modules/core/include/opencv2/core/core.hpp:45:2: error: #error this is a compatibility header which should not be used inside the OpenCV library #error this is a compatibility header which should not be used inside the OpenCV library ^ In file included from /usr/include/opencv2/core/internal.hpp:53:0, from /home/unnirajendran/opencv/apps/traincascade/_cvcommon.h:46, from /home/unnirajendran/opencv/apps/traincascade/_cvhaartraining.h:51, from /home/unnirajendran/opencv/apps/traincascade/mergevec.cpp:8: /home/unnirajendran/opencv/modules/core/include/opencv2/core/core.hpp:45:2: error: #error this is a compatibility header which should not be used inside the OpenCV library #error this is a compatibility header which should not be used inside the OpenCV library ^ /home/unnirajendran/opencv/apps/traincascade/mergevec.cpp: In function ‘void icvMergeVecs(char, const char, int, int, int)’: /home/unnirajendran/opencv/apps/traincascade/mergevec.cpp:102:73: warning: ignoring return value of ‘size_t fread(void, size_t, size_t, FILE)’, declared with attribute warn_unused_result [-Wunused-result] fread( &invec.count, sizeof( invec.count ) , 1, invec.input ); ^ /home/unnirajendran/opencv/apps/traincascade/mergevec.cpp:103:73: warning: ignoring return value of ‘size_t fread(void, size_t, size_t, FILE)’, declared with attribute warn_unused_result [-Wunused-result] fread( &invec.vecsize, sizeof( invec.vecsize ), 1, invec.input ); ^ /home/unnirajendran/opencv/apps/traincascade/mergevec.cpp:104:53: warning: ignoring return value of ‘size_t fread(void, size_t, size_t, FILE)’, declared with attribute warn_unused_result [-Wunused-result] fread( &tmp, sizeof( tmp ), 1, invec.input ); ^ /home/unnirajendran/opencv/apps/traincascade/mergevec.cpp:105:53: warning: ignoring return value of ‘size_t fread(void, size_t, size_t, FILE)’, declared with attribute warn_unused_result [-Wunused-result] fread( &tmp, sizeof( tmp ), 1, invec.input ); ^ /home/unnirajendran/opencv/apps/traincascade/mergevec.cpp:128:73: warning: ignoring return value of ‘size_t fread(void, size_t, size_t, FILE)’, declared with attribute warn_unused_result [-Wunused-result] fread( &invec.count, sizeof( invec.count ) , 1, invec.input ); ^ /home/unnirajendran/opencv/apps/traincascade/mergevec.cpp:129:73: warning: ignoring return value of ‘size_t fread(void, size_t, size_t, FILE)’, declared with attribute warn_unused_result [-Wunused-result] fread( &invec.vecsize, sizeof( invec.vecsize ), 1, invec.input ); ^ /home/unnirajendran/opencv/apps/traincascade/mergevec.cpp:130:53: warning: ignoring return value of ‘size_t fread(void, size_t, size_t, FILE)’, declared with attribute warn_unused_result [-Wunused-result] fread( &tmp, sizeof( tmp ), 1, invec.input ); ^ /home/unnirajendran/opencv/apps/traincascade/mergevec.cpp:131:53: warning: ignoring return value of ‘size_t fread(void, size_t, size_t, FILE)’, declared with attribute warn_unused_result [-Wunused-result] fread( &tmp, sizeof( tmp ), 1, invec.input ); ^ apps/traincascade/CMakeFiles/opencv_traincascade.dir/build.make:169: recipe for target 'apps/traincascade/CMakeFiles/opencv_traincascade.dir/mergevec.cpp.o' failed make[2]: * [apps/traincascade/CMakeFiles/opencv_traincascade.dir/mergevec.cpp.o] Error 1 CMakeFiles/Makefile2:11485: recipe for target 'apps/traincascade/CMakeFiles/opencv_traincascade.dir/all' failed make[1]: [apps/traincascade/CMakeFiles/opencv_traincascade.dir/all] Error 2 Makefile:147: recipe for target 'all' failed make: ** [all] Error 2
command that i used with CMAKE is following
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_TIFF=ON -D BUILD_EXAMPLES=ON -D CUDA_GENERATION=Auto -D BUILD_NEW_PYTHON_SUPPORT=ON ..
please help me solve this error