Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

OpenCV 3.0 xfeatures2d.lib not Being Compiled

I am trying to transition from OpenCV 2.4.9 to 3.0 but I am having trouble getting xfeatures2d to compile as a lib. I am using VS2012 c++/cli on a Win8.1 64 bit machine using CMake 3.0.1.

I do not have any problem just making OpenCV 3.0 itself but need to add xfeatures2d so I can use SURF, etc.

I downloaded the xfeatures2d, etc. code from https://github.com/Itseez/opencv_contrib and installed it on my hard drive at the root, so the files are stored in opencv_contrib-master. I added c:/opencv_contrib-master/modules to the OPENCV_EXTRA_MODULES_PATH setting but changed nothing else. CMake config and master report no problems.

When I now select the ALL_BUILD project, I compile for quite a period of time. The first project I fail at says:

94>Time Elapsed 00:00:05.27
98>------ Build started: Project: (sample) simpleflow_demo, Configuration: Debug x64 ------
98>Build started 6/12/2015 10:42:43 PM.
98>InitializeBuildStatus:
98>  Touching "example_optflow_simpleflow_demo.dir\Debug\(sample) simpleflow_demo.unsuccessfulbuild".
98>CustomBuild:
98>  Building Custom Rule C:/opencv_contrib-master/modules/optflow/CMakeLists.txt
98>  CMake does not need to re-run because C:\opencv\build\modules\optflow\CMakeFiles\generate.stamp is up-to-date.
97>C:\opencv_contrib-master\modules\optflow\samples\optical_flow_evaluation.cpp(43): error C2065: 'NAN' : undeclared identifier

97>C:\opencv_contrib-master\modules\optflow\samples\optical_flow_evaluation.cpp(64): error C2065: 'NAN' : undeclared identifier 98>ClCompile: 98> simpleflow_demo.cpp 97> 97>Build FAILED.

Next, I fail at:

118>Time Elapsed 00:00:16.65
125>  disparity_bilateral_filter.cu
126>------ Build started: Project: opencv_line_descriptor, Configuration: Debug x64 ------
126>Build started 6/12/2015 10:43:48 PM.
126>InitializeBuildStatus:
126>  Touching "opencv_line_descriptor.dir\Debug\opencv_line_descriptor.unsuccessfulbuild".
126>CustomBuild:
126>  Building Custom Rule C:/opencv_contrib-master/modules/line_descriptor/CMakeLists.txt
126>  CMake does not need to re-run because C:\opencv\build\modules\line_descriptor\CMakeFiles\generate.stamp is up-to-date.
126>ClCompile:
126>  opencv_line_descriptor_pch.cpp
124>  depth_cleaner.cpp
124>  depth_to_3d.cpp
124>  linemod.cpp
124>  normal.cpp
124>  odometry.cpp
124>  plane.cpp
124>  utils.cpp
77>C:\opencv\sources\modules\core\include\opencv2/core/base.hpp(342): warning : function declared with "noreturn" does return
77>  
123>C:\opencv\sources\modules\core\include\opencv2/core/base.hpp(342): warning : function declared with "noreturn" does return
123>  
126>c:\opencv_contrib-master\modules\line_descriptor\src\bitops.hpp(104): error C2059: syntax error : 'bad suffix on number'
126>c:\opencv_contrib-master\modules\line_descriptor\src\bitops.hpp(104): error C2146: syntax error : missing ',' before identifier 'U'
126>c:\opencv_contrib-master\modules\line_descriptor\src\bitops.hpp(104): error C2065: 'U' : undeclared identifier
126>
124>Link:
124>     Creating library C:/opencv/build/lib/Debug/opencv_rgbd300d.lib and object C:/opencv/build/lib/Debug/opencv_rgbd300d.exp
126>Build FAILED.

Ultimately, VS reports: ========== Build: 181 succeeded, 186 failed, 0 up-to-date, 55 skipped ==========

I have tried only specifying the top level of the contrib download (i.e., c:/opencv_contrib-master) in CMake and while that reports fewer failures, it still does not build xfeatures2d.

Any help on getting this to work greatly appreciated.

OpenCV 3.0 xfeatures2d.lib not Being Compiled

I am trying to transition from OpenCV 2.4.9 to 3.0 but I am having trouble getting xfeatures2d to compile as a lib. I am using VS2012 c++/cli on a Win8.1 64 bit machine using CMake 3.0.1.

I do not have any problem just making OpenCV 3.0 itself but need to add xfeatures2d so I can use SURF, etc.

I downloaded the xfeatures2d, etc. code from https://github.com/Itseez/opencv_contrib and installed it on my hard drive at the root, so the files are stored in opencv_contrib-master. I added c:/opencv_contrib-master/modules to the OPENCV_EXTRA_MODULES_PATH setting but changed nothing else. CMake config and master report no problems.

When I now select the ALL_BUILD project, I compile for quite a period of time. The first project I fail at says:

94>Time Elapsed 00:00:05.27
98>------ Build started: Project: (sample) simpleflow_demo, Configuration: Debug x64 ------
98>Build started 6/12/2015 10:42:43 PM.
98>InitializeBuildStatus:
98>  Touching "example_optflow_simpleflow_demo.dir\Debug\(sample) simpleflow_demo.unsuccessfulbuild".
98>CustomBuild:
98>  Building Custom Rule C:/opencv_contrib-master/modules/optflow/CMakeLists.txt
98>  CMake does not need to re-run because C:\opencv\build\modules\optflow\CMakeFiles\generate.stamp is up-to-date.
97>C:\opencv_contrib-master\modules\optflow\samples\optical_flow_evaluation.cpp(43): error C2065: 'NAN' : undeclared identifier

97>C:\opencv_contrib-master\modules\optflow\samples\optical_flow_evaluation.cpp(64): error C2065: 'NAN' : undeclared identifier 98>ClCompile: 98> simpleflow_demo.cpp 97> 97>Build FAILED.

Next, I fail at:

118>Time Elapsed 00:00:16.65
125>  disparity_bilateral_filter.cu
126>------ Build started: Project: opencv_line_descriptor, Configuration: Debug x64 ------
126>Build started 6/12/2015 10:43:48 PM.
126>InitializeBuildStatus:
126>  Touching "opencv_line_descriptor.dir\Debug\opencv_line_descriptor.unsuccessfulbuild".
126>CustomBuild:
126>  Building Custom Rule C:/opencv_contrib-master/modules/line_descriptor/CMakeLists.txt
126>  CMake does not need to re-run because C:\opencv\build\modules\line_descriptor\CMakeFiles\generate.stamp is up-to-date.
126>ClCompile:
126>  opencv_line_descriptor_pch.cpp
124>  depth_cleaner.cpp
124>  depth_to_3d.cpp
124>  linemod.cpp
124>  normal.cpp
124>  odometry.cpp
124>  plane.cpp
124>  utils.cpp
77>C:\opencv\sources\modules\core\include\opencv2/core/base.hpp(342): warning : function declared with "noreturn" does return
77>  
123>C:\opencv\sources\modules\core\include\opencv2/core/base.hpp(342): warning : function declared with "noreturn" does return
123>  
126>c:\opencv_contrib-master\modules\line_descriptor\src\bitops.hpp(104): error C2059: syntax error : 'bad suffix on number'
126>c:\opencv_contrib-master\modules\line_descriptor\src\bitops.hpp(104): error C2146: syntax error : missing ',' before identifier 'U'
126>c:\opencv_contrib-master\modules\line_descriptor\src\bitops.hpp(104): error C2065: 'U' : undeclared identifier
126>
124>Link:
124>     Creating library C:/opencv/build/lib/Debug/opencv_rgbd300d.lib and object C:/opencv/build/lib/Debug/opencv_rgbd300d.exp
126>Build FAILED.

Ultimately, VS reports: ========== Build: 181 succeeded, 186 failed, 0 up-to-date, 55 skipped ==========

I have tried only specifying the top level of the contrib download (i.e., c:/opencv_contrib-master) in CMake and while that reports fewer failures, it still does not build xfeatures2d.

Any help on getting this I disabled line_descriptor without much effect. It only reduced the failed projects to work greatly appreciated.177. The first new failed project reports:

84>Time Elapsed 00:00:04.60
85>Build started 6/13/2015 8:04:27 AM.
85>InitializeBuildStatus:
85>  Creating "opencv_latentsvm.dir\Debug\opencv_latentsvm.unsuccessfulbuild" because "AlwaysCreate" was specified.
85>CustomBuild:
85>  All outputs are up-to-date.
85>ClCompile:
85>  opencv_latentsvm_pch.cpp
82>
82>Build FAILED.

The first fail that mentions xfeatures2d reports:

141>Time Elapsed 00:00:14.26
137>C:\opencv\sources\modules\core\include\opencv2/core/base.hpp(342): warning : function declared with "noreturn" does return
137>  
137>C:\opencv\sources\modules\core\include\opencv2/core/types.hpp(482): warning : field of class type without a DLL interface used in a class with a DLL interface
137>  
137>C:\opencv\sources\modules\core\include\opencv2/core/types.hpp(483): warning : field of class type without a DLL interface used in a class with a DLL interface
137>  
137>C:\opencv\sources\modules\core\include\opencv2/core/types.hpp(692): warning : field of class type without a DLL interface used in a class with a DLL interface
137>  
137>C:\opencv\sources\modules\core\include\opencv2/core/mat.hpp(231): warning : field of class type without a DLL interface used in a class with a DLL interface
137>  
137>C:\opencv\sources\modules\core\include\opencv2/core/mat.hpp(2414): warning : field of class type without a DLL interface used in a class with a DLL interface
137>  
137>C:\opencv\sources\modules\core\include\opencv2/core/mat.hpp(2415): warning : field of class type without a DLL interface used in a class with a DLL interface
137>  
137>C:\opencv\sources\modules\core\include\opencv2/core/mat.hpp(3282): warning : field of class type without a DLL interface used in a class with a DLL interface
137>  
137>C:\opencv\sources\modules\core\include\opencv2/core/persistence.hpp(434): warning : field of class type without a DLL interface used in a class with a DLL interface
137>  
137>C:\opencv\sources\modules\core\include\opencv2/core/persistence.hpp(436): warning : field of class type without a DLL interface used in a class with a DLL interface
137>  
137>C:\opencv\sources\modules\core\include\opencv2/core.hpp(98): warning : base class dllexport/dllimport specification differs from that of the derived class
137>  
137>C:\opencv\sources\modules\core\include\opencv2/core/cuda.hpp(494): warning : field of class type without a DLL interface used in a class with a DLL interface
137>  
137>C:\opencv\sources\modules\core\include\opencv2/core/cuda.hpp(530): warning : field of class type without a DLL interface used in a class with a DLL interface
137>  
134>  brief.cpp
134>  daisy.cpp
134>  freak.cpp
134>  latch.cpp
134>  lucid.cpp
134>  sift.cpp
134>  stardetector.cpp
134>  surf.cpp
134>C:\opencv_contrib-master\modules\xfeatures2d\src\daisy.cpp(1270): error C3861: 'round': identifier not found
134>  surf.cuda.cpp
134>  surf.ocl.cpp
134>  xfeatures2d_init.cpp
134>  opencl_kernels_xfeatures2d.cpp
134>
134>Build FAILED.

Thanks for any help