I am trying to use the legacy.hpp as header in centos 7, kdevelop 4 editor. Building the code results in following errors. I am looking forward to get my problem solved. Thanks in advance.

asked 2016-11-15 23:28:05 -0500

updated 2016-11-16 01:11:59 -0500

berak gravatar image
 /home/vlab/WorkSpaces/ImgReg/build> make -j2
-- A library with BLAS API found.
-- A library with LAPACK API found.
-- GSL using gsl-config /usr/local/bin/gsl-config
-- Using GSL from /usr/local
You have called ADD_LIBRARY for library cimg_tut without any source files. This typically indicates a problem with your CMakeLists.txt file
-- Configuring done
-- Generating done
-- Build files have been written to: /home/vlab/WorkSpaces/ImgReg/build
Scanning dependencies of target core
Scanning dependencies of target core.out
[  3%] Building CXX object CMakeFiles/core.dir/components/core/cvplot.cpp.o
[  6%] Building CXX object CMakeFiles/core.out.dir/components/core/cvplot.cpp.o
[  9%] Building CXX object CMakeFiles/core.dir/components/core/TMCDicomImage.cpp.o
[ 12%] Building CXX object CMakeFiles/core.out.dir/components/core/TMCDicomImage.cpp.o
[ 16%] Building CXX object CMakeFiles/core.dir/components/core/TMCDicomManager.cpp.o
[ 19%] Building CXX object CMakeFiles/core.out.dir/components/core/TMCDicomManager.cpp.o
[ 22%] Building CXX object CMakeFiles/core.dir/components/core/TMCDicomVolume.cpp.o
[ 25%] Building CXX object CMakeFiles/core.out.dir/components/core/TMCDicomVolume.cpp.o
[ 29%] Building CXX object CMakeFiles/core.dir/components/core/TMCFileStorageManager.cpp.o
[ 32%] Building CXX object CMakeFiles/core.out.dir/components/core/TMCFileStorageManager.cpp.o
[ 35%] Building CXX object CMakeFiles/core.dir/components/core/TMCGNUPlot.cpp.o
[ 38%] Building CXX object CMakeFiles/core.out.dir/components/core/TMCGNUPlot.cpp.o
[ 41%] Building CXX object CMakeFiles/core.dir/components/core/TMCLogger.cpp.o
[ 45%] Building CXX object CMakeFiles/core.out.dir/components/core/TMCLogger.cpp.o
[ 48%] Building CXX object CMakeFiles/core.dir/components/core/IOUtils.cpp.o
[ 51%] Building CXX object CMakeFiles/core.out.dir/components/core/IOUtils.cpp.o
[ 54%] Building CXX object CMakeFiles/core.dir/components/core/CImgOpenCVBridge.cpp.o
[ 58%] Building CXX object CMakeFiles/core.out.dir/components/core/CImgOpenCVBridge.cpp.o
[ 61%] Building CXX object CMakeFiles/core.dir/components/core/CImgVolume.cpp.o
[ 64%] Building CXX object CMakeFiles/core.out.dir/components/core/CImgVolume.cpp.o
In file included from /home/vlab/WorkSpaces/ImgReg/components/core/CImgVolume.hpp:9:0,
                 from /home/vlab/WorkSpaces/ImgReg/components/core/CImgVolume.cpp:1:
/home/vlab/WorkSpaces/ImgReg/components/core/CImgOpenCVBridge.hpp:15:0: warning: "cimg_verbosity" redefined [enabled by default]
 #define cimg_verbosity 0
 ^
In file included from /home/vlab/WorkSpaces/ImgReg/components/core/CImgVolume.hpp:4:0,
                 from /home/vlab/WorkSpaces/ImgReg/components/core/CImgVolume.cpp:1:
/usr/local/include/cimg/CImg.h:246:0: note: this is the location of the previous definition
 #define cimg_verbosity 1
 ^
In file included from /home/vlab/WorkSpaces/ImgReg/components/core/CImgVolume.hpp:9:0,
                 from /home/vlab/WorkSpaces/ImgReg/components/core/CImgVolume.cpp:1:
/home/vlab/WorkSpaces/ImgReg/components/core/CImgOpenCVBridge.hpp:15:0: warning: "cimg_verbosity" redefined [enabled by default]
 #define cimg_verbosity 0
 ^
In file included from /home/vlab/WorkSpaces/ImgReg/components/core/CImgVolume.hpp:4:0,
                 from /home/vlab/WorkSpaces/ImgReg/components/core/CImgVolume.cpp:1:
/usr/local/include/cimg/CImg.h:246:0: note: this is the location of the previous definition
 #define ...
(more)
edit retag flag offensive close merge delete

Comments

which weird project are you trying to build there ? which opencv version do you use here ?

berak gravatar imageberak ( 2016-11-16 01:14:58 -0500 )edit

may be it is this one with this CMakeLists

LBerger gravatar imageLBerger ( 2016-11-16 01:47:22 -0500 )edit

just a Tip offtopic: try to look through the Output by yourself and look, what really IS a Error and what is just a INFORMATION. When you do that, you could leave just the Errors here and would have a much smaller Question. Many People either don't see the little more link at the Bottom or don't want to screen such a large Output. Besides that, what are youre CMake settings? that could help a little.

Vintez gravatar imageVintez ( 2016-11-16 03:56:46 -0500 )edit

also note, that the whole legacy module has been removed in recent opencv, so it's probably a bad idea, to rely on code using it.

berak gravatar imageberak ( 2016-11-16 04:12:50 -0500 )edit