compiling ROPTLIB example, a C++ lib for convert Manopt to C++ - c++

I'm tring to conform a part of matlab source to C++. The matlab source calls a matlab lib named Manopt for params optimizing, So I found a lib in C++ named ROPTLIB(http://www.math.fsu.edu/ROPTLIB/) to realize the same optimization as Manopt.
The problem occured when I download ROPTLIB and try to run the example demo in ROPTLIB user manual. I wrote a CMakeLists.txt(as follow) to compile the lib source code, for there is no compiling tools in lib diretory(except matlab script, but I want the lib run in pure C++ environment in my ubuntu 14.04LTS). The package of lapack and blas are also link to project as you can see in CMakelists.txt.
I try to search the Problem both in google and other forums, but no one can help me. If you have any experience for debug locale_facets_nonio.tcc:918:22: error: expected unqualified-id before or ROPTLIB, printing it blow mat help me.
CmakeLists.txt:
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.3)
SET(ProjectName TestProductExample)
PROJECT(${ProjectName})
FILE(GLOB_RECURSE all_files
"${CMAKE_CURRENT_SOURCE_DIR}/Solvers/*.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/Problems/*.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/Others/*.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/Manifolds/*.cpp"
)
INCLUDE_DIRECTORIES(
"${CMAKE_CURRENT_SOURCE_DIR}/Solvers/"
"${CMAKE_CURRENT_SOURCE_DIR}/Problems/"
"${CMAKE_CURRENT_SOURCE_DIR}/Problems/StieSumBrockett/"
"${CMAKE_CURRENT_SOURCE_DIR}/Others/"
"${CMAKE_CURRENT_SOURCE_DIR}/Manifolds/"
"${CMAKE_CURRENT_SOURCE_DIR}/Manifolds/Stiefel/"
"${CMAKE_CURRENT_SOURCE_DIR}/Manifolds/Euclidean/"
"${CMAKE_CURRENT_SOURCE_DIR}/blas/"
"${CMAKE_CURRENT_SOURCE_DIR}/lapack/"
)
message(STATUS "add include_directories " ${INCLUDE_DIRECTORIES})
if(${CMAKE_COMPILER_IS_GNUCC})
message (STATUS "add c++11 flags")
add_definitions(-Wall -s -std=c++11 )
endif()
set(LIB "${CMAKE_CURRENT_SOURCE_DIR}/lib/;${LIB}")
message (STATUS "blas and lapack lib is in ${LIB}")
add_executable(${ProjectName} ${CMAKE_CURRENT_SOURCE_DIR}/test/TestProductExample.cpp ${all_files})
link_directories({${LIB}})
target_link_libraries(${ProjectName} lapack_LINUX.a blas_LINUX.a tmglib_LINUX.a)
message (STATUS "CMAKE_C_COMPILER is ${CMAKE_C_COMPILER}, CMAKE_CXX_COMPILER is ${CMAKE_CXX_COMPILER}")
message (STATUS "CMAKE_COMPILER_IS_GNUCC is ${CMAKE_COMPILER_IS_GNUCC}")`
error log:
[ 1%] Building CXX object CMakeFiles/TestProductExample.dir/test/TestProductExample.cpp.o
In file included from /usr/include/c++/4.7/bits/locale_facets_nonio.h:1903:0,
from /usr/include/c++/4.7/locale:43,
from /usr/include/c++/4.7/iomanip:45,
from /home/wangyuanjiang/Documents/software/ROPTLIB_2016-04-29_CPP/Manifolds/Manifold.h:23,
from /home/wangyuanjiang/Documents/software/ROPTLIB_2016-04-29_CPP/Problems/Problem.h:16,
from /home/wangyuanjiang/Documents/software/ROPTLIB_2016-04-29_CPP/test/TestProductExample.cpp:20:
/usr/include/c++/4.7/bits/locale_facets_nonio.tcc: In member function ‘_InIter std::time_get<_CharT, _InIter>::_M_extract_name(std::time_get<_CharT, _InIter>::iter_type, std::time_get<_CharT, _InIter>::iter_type, int&, const _CharT**, std::size_t, std::ios_base&, std::ios_base::iostate&) const’:
/usr/include/c++/4.7/bits/locale_facets_nonio.tcc:918:22: error: expected unqualified-id before ‘(’ token
In file included from /home/wangyuanjiang/Documents/software/ROPTLIB_2016-04-29_CPP/test/TestProductExample.cpp:15:0:
/home/wangyuanjiang/Documents/software/ROPTLIB_2016-04-29_CPP/Others/randgen.h: At global scope:
/home/wangyuanjiang/Documents/software/ROPTLIB_2016-04-29_CPP/Others/randgen.h:69:13: warning: ‘void next_state()’ declared ‘static’ but never defined [-Wunused-function]
/home/wangyuanjiang/Documents/software/ROPTLIB_2016-04-29_CPP/Others/randgen.h:64:22: warning: ‘randgen::state’ defined but not used [-Wunused-variable]
/home/wangyuanjiang/Documents/software/ROPTLIB_2016-04-29_CPP/Others/randgen.h:65:12: warning: ‘randgen::left’ defined but not used [-Wunused-variable]
/home/wangyuanjiang/Documents/software/ROPTLIB_2016-04-29_CPP/Others/randgen.h:66:12: warning: ‘randgen::initf’ defined but not used [-Wunused-variable]
/home/wangyuanjiang/Documents/software/ROPTLIB_2016-04-29_CPP/Others/randgen.h:67:23: warning: ‘randgen::next’ defined but not used [-Wunused-variable]
make[2]: *** [CMakeFiles/TestProductExample.dir/test/TestProductExample.cpp.o] Error 1
make[1]: *** [CMakeFiles/TestProductExample.dir/all] Error 2
make: *** [all] Error 2

Related

Undefined Reference error with RGBD.hpp file from opencv

I've got a problem at the moment...
I've got a cmake file that includes the local computer files.
cmake_minimum_required(VERSION 3.10)
project(testproject)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -pthread -Wall -fPIC -Ofast -fopenmp")
link_directories(/usr/local/lib/cmake)
set(CMAKE_BUILD_TYPE "Debug")
find_package(OpenCV REQUIRED)
set(LIBRARY_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/Libraries/include)
set(LIBRARY_USR_INCLUDE_DIR /usr/local/include)
add_executable(testproject
"base.cpp"
"Libraries/include/base64/base64.h"
"Libraries/include/base64/base64.cpp"
)
target_include_directories(${CMAKE_PROJECT_NAME} PUBLIC ${LIBRARY_USR_INCLUDE_DIR} ${OpenCV_INCLUDE_DIRS} ${LIBRARIES} ${LIBRARY_INCLUDE_DIR})
target_link_libraries(${CMAKE_PROJECT_NAME} "${OpenCV_LIBS}" stdc++fs)
The include file within CMAKE works because there are other files with opencv included and those are found..
Only the weird problem is that the rgbd.hpp (File is under /usr/local/include/) is found and also the function but when i'm making the the file with.
Terminal Process:
make -j7
ERROR RESULT:
[ 15%] Linking CXX executable count
CMakeFiles/count.dir/base.cpp.o: In function `main':
/home/testpc/Documents/Test/base.cpp:10: undefined reference to `cv::rgbd::DepthCleaner::DepthCleaner(int, int, int)'
collect2: error: ld returned 1 exit status
CMakeFiles/count.dir/build.make:374: recipe for target 'count' failed
make[2]: *** [count] Error 1
CMakeFiles/Makefile2:94: recipe for target 'CMakeFiles/count.dir/all' failed
make[1]: *** [CMakeFiles/count.dir/all] Error 2
Makefile:102: recipe for target 'all' failed
make: *** [all] Error 2
That this happens when all the other files are already have been compiled.
Problem class: Base.cpp
#include "opencv2/rgbd.hpp"
int main()
{
rgbd::DepthCleaner * depthc = new rgbd::DepthCleaner(CV_16U, 7, rgbd::DepthCleaner::DEPTH_CLEANER_NIL);
}
Possible Tried Solutions:
Still having the same result, When i remove the content within the main method and replace it with cout << "Test" << endl; It builds and runs as it suppose to be. Also works when I create a new raw Material blanko with standard Opencv core included.
It only does not build with the RGBD Include and instance creation.
(RGDB.hpp does not stand under /usr/local/inlclude) but under /usr/include. So i removed the local part but still responded as the same current issue. Any other possible solution?

Cannot link opencv-3.2.0 when cross compile for beaglebone black

I created a rootfs directory for beaglebone black by chroot and install libopencv-dev for this target.
When I try cross compile with CMAKE_SYSROOT=<rootfs_dir> and link opencv lib to build the app it cannot work.
the toolchain file:
SET(CMAKE_SYSTEM_NAME Linux)
#this one not so much
SET(CMAKE_SYSTEM_VERSION 1)
SET(CMAKE_CROSSCOMPILING TRUE)
# specify the cross compiler
SET(CMAKE_C_COMPILER arm-linux-gnueabihf-gcc)
SET(CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++)
# where is the target environment
SET(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT})
# search for programs in the build host directories
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# for libraries and headers in the target directories
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
the CMakeLists.txt
set(SRC_FILES helloworld_opencv.cpp)
set(HEADER_FILES helloworld_opencv.hpp)
find_package(OpenCV 3.2.0 EXACT REQUIRED)
add_executable(HelloWorldOpenCV ${SRC_FILES} ${HEADER_FILES})
target_include_directories(HelloWorldOpenCV PUBLIC ${OpenCV_INCLUDE_DIRS})
target_link_libraries(HelloWorldOpenCV PUBLIC ${OpenCV_LIBS})
install(
FILES ${HEADER_FILES}
DESTINATION ${CMAKE_INSTALL_PREFIX}/include
)
install(
TARGETS HelloWorldOpenCV
DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
)
install(
FILES chart.png
DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
)
It found opencv lib in the target rootfs, but the problem here is when I use
target_link_libraries(HelloWorldOpenCV PUBLIC ${OpenCV_LIBS})
It always links some header file from host machine, and when I comment this line it links the header file from target rootfs as I expected
The log when build:
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/arm-linux-gnueabihf-gcc
-- Check for working C compiler: /usr/bin/arm-linux-gnueabihf-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/arm-linux-gnueabihf-g++
-- Check for working CXX compiler: /usr/bin/arm-linux-gnueabihf-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CMAKE SYSROOT: /home/vinhnt/bluesky/../rootfs
-- Found OpenCV: /home/vinhnt/rootfs/usr (found suitable exact version "3.2.0")
-- Found OpenCV
-- OPENCV LIB: opencv_calib3dopencv_coreopencv_features2dopencv_flannopencv_highguiopencv_imgcodecsopencv_imgprocopencv_mlopencv_objdetectopencv_photoopencv_shapeopencv_stitchingopencv_superresopencv_videoopencv_videoioopencv_videostabopencv_vizopencv_arucoopencv_bgsegmopencv_bioinspiredopencv_ccalibopencv_datasetsopencv_dpmopencv_faceopencv_freetypeopencv_fuzzyopencv_hdfopencv_line_descriptoropencv_optflowopencv_phase_unwrappingopencv_plotopencv_regopencv_rgbdopencv_saliencyopencv_stereoopencv_structured_lightopencv_surface_matchingopencv_textopencv_ximgprocopencv_xobjdetectopencv_xphoto
-- Configuring done
-- Generating done
-- Build files have been written to: /home/vinhnt/bluesky/build
Scanning dependencies of target HelloWorldOpenCV
[ 50%] Building CXX object src/helloworld_opencv/CMakeFiles/HelloWorldOpenCV.dir/helloworld_opencv.cpp.o
In file included from /usr/arm-linux-gnueabihf/include/c++/7/cstdint:41:0,
from /usr/arm-linux-gnueabihf/include/c++/7/bits/char_traits.h:501,
from /usr/arm-linux-gnueabihf/include/c++/7/ios:40,
from /usr/arm-linux-gnueabihf/include/c++/7/ostream:38,
from /usr/arm-linux-gnueabihf/include/c++/7/iostream:39,
from /home/vinhnt/bluesky/src/helloworld_opencv/helloworld_opencv.cpp:3:
/home/vinhnt/rootfs/usr/include/stdint.h:43:9: error: ‘__int_least8_t’ does not name a type; did you mean ‘__intptr_t’?
typedef __int_least8_t int_least8_t;
^~~~~~~~~~~~~~
__intptr_t
/home/vinhnt/rootfs/usr/include/stdint.h:44:9: error: ‘__int_least16_t’ does not name a type; did you mean ‘__int16_t’?
typedef __int_least16_t int_least16_t;
^~~~~~~~~~~~~~~
__int16_t
/home/vinhnt/rootfs/usr/include/stdint.h:45:9: error: ‘__int_least32_t’ does not name a type; did you mean ‘__int32_t’?
typedef __int_least32_t int_least32_t;
^~~~~~~~~~~~~~~
__int32_t
/home/vinhnt/rootfs/usr/include/stdint.h:46:9: error: ‘__int_least64_t’ does not name a type; did you mean ‘__int64_t’?
typedef __int_least64_t int_least64_t;
^~~~~~~~~~~~~~~
__int64_t
/home/vinhnt/rootfs/usr/include/stdint.h:49:9: error: ‘__uint_least8_t’ does not name a type; did you mean ‘__uintmax_t’?
typedef __uint_least8_t uint_least8_t;
^~~~~~~~~~~~~~~
__uintmax_t
/home/vinhnt/rootfs/usr/include/stdint.h:50:9: error: ‘__uint_least16_t’ does not name a type; did you mean ‘__uint16_t’?
typedef __uint_least16_t uint_least16_t;
^~~~~~~~~~~~~~~~
__uint16_t
/home/vinhnt/rootfs/usr/include/stdint.h:51:9: error: ‘__uint_least32_t’ does not name a type; did you mean ‘__uint32_t’?
typedef __uint_least32_t uint_least32_t;
^~~~~~~~~~~~~~~~
__uint32_t
/home/vinhnt/rootfs/usr/include/stdint.h:52:9: error: ‘__uint_least64_t’ does not name a type; did you mean ‘__uint64_t’?
typedef __uint_least64_t uint_least64_t;
^~~~~~~~~~~~~~~~
__uint64_t
In file included from /usr/arm-linux-gnueabihf/include/c++/7/bits/char_traits.h:501:0,
from /usr/arm-linux-gnueabihf/include/c++/7/ios:40,
from /usr/arm-linux-gnueabihf/include/c++/7/ostream:38,
from /usr/arm-linux-gnueabihf/include/c++/7/iostream:39,
from /home/vinhnt/bluesky/src/helloworld_opencv/helloworld_opencv.cpp:3:
/usr/arm-linux-gnueabihf/include/c++/7/cstdint:58:11: error: ‘::int_least8_t’ has not been declared
using ::int_least8_t;
^~~~~~~~~~~~
/usr/arm-linux-gnueabihf/include/c++/7/cstdint:59:11: error: ‘::int_least16_t’ has not been declared
using ::int_least16_t;
^~~~~~~~~~~~~
/usr/arm-linux-gnueabihf/include/c++/7/cstdint:60:11: error: ‘::int_least32_t’ has not been declared
using ::int_least32_t;
^~~~~~~~~~~~~
/usr/arm-linux-gnueabihf/include/c++/7/cstdint:61:11: error: ‘::int_least64_t’ has not been declared
using ::int_least64_t;
^~~~~~~~~~~~~
/usr/arm-linux-gnueabihf/include/c++/7/cstdint:76:11: error: ‘::uint_least8_t’ has not been declared
using ::uint_least8_t;
^~~~~~~~~~~~~
/usr/arm-linux-gnueabihf/include/c++/7/cstdint:77:11: error: ‘::uint_least16_t’ has not been declared
using ::uint_least16_t;
^~~~~~~~~~~~~~
/usr/arm-linux-gnueabihf/include/c++/7/cstdint:78:11: error: ‘::uint_least32_t’ has not been declared
using ::uint_least32_t;
^~~~~~~~~~~~~~
/usr/arm-linux-gnueabihf/include/c++/7/cstdint:79:11: error: ‘::uint_least64_t’ has not been declared
using ::uint_least64_t;
^~~~~~~~~~~~~~
src/helloworld_opencv/CMakeFiles/HelloWorldOpenCV.dir/build.make:62: recipe for target 'src/helloworld_opencv/CMakeFiles/HelloWorldOpenCV.dir/helloworld_opencv.cpp.o' failed
make[2]: *** [src/helloworld_opencv/CMakeFiles/HelloWorldOpenCV.dir/helloworld_opencv.cpp.o] Error 1
CMakeFiles/Makefile2:103: recipe for target 'src/helloworld_opencv/CMakeFiles/HelloWorldOpenCV.dir/all' failed
make[1]: *** [src/helloworld_opencv/CMakeFiles/HelloWorldOpenCV.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
anyone got this problem, please help me!

Error in TensorFlow building tensorflow::EagerContext' has no member named 'GetContextId'

I'm Trying to install TensorFlow (c++ lib) by source compiling on ODROID XU4 but get error while eager become build.
Error is:
ERROR: /home/odroid/buildFile/tensorflow/tensorflow/tensorflow/core/distributed_runtime/eager/BUILD:148:1: C++ compilation of rule '//tensorflow/core/distributed_runtime/eager:remote_tensor_handle_data' failed (Exit 1)
tensorflow/core/distributed_runtime/eager/remote_tensor_handle_data.cc: In function 'void tensorflow::{anonymous}::DestoryRemoteTensorHandle(tensorflow::EagerContext*, tensorflow::eager::EagerClient*, tensorflow::uint64, tensorflow::uint64, int)':
tensorflow/core/distributed_runtime/eager/remote_tensor_handle_data.cc:30:12: error: 'class tensorflow::EagerContext' has no member named 'GetContextId'; did you mean 'NewContextId'?
if (ctx->GetContextId() != context_id) {
^~~~~~~~~~~~
NewContextId
Target //tensorflow:libtensorflow_cc.so failed to build
How I can fix it?
OR Is Impossible for me to disable building this module in bazel command?
tnx.

GTest - isatty not declared in this scope

I've spent hours trying to figure out why I'm getting the following compiling error:
~/src/example/build $ make
-- Downloading GMock / GTest version 1.8.0 from git
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/src/example/build
[ 5%] Performing update step for 'gmock'
[ 10%] Performing configure step for 'gmock'
-- gmock configure command succeeded. See also /home/user/src/example/build/gmock/src/gmock-stamp/gmock-configure-*.log
[ 15%] Performing build step for 'gmock'
-- gmock build command succeeded. See also /home/user/src/example/build/gmock/src/gmock-stamp/gmock-build-*.log
[ 20%] No install step for 'gmock'
[ 25%] Completed 'gmock'
[ 40%] Built target gmock
[ 75%] Built target project-app
Scanning dependencies of target step_definition_runner
[ 80%] Building CXX object Target/project/CMakeFiles/step_definition_runner.dir/features/step_definitions/App_Steps.cpp.o
In file included from /home/user/src/example/build/gmock/src/gmock/googletest/include/gtest/internal/gtest-internal.h:40:0,
from /home/user/src/example/build/gmock/src/gmock/googletest/include/gtest/gtest.h:58,
from /home/user/src/example/Target/project/features/step_definitions/App_Steps.cpp:1:
/home/user/src/example/build/gmock/src/gmock/googletest/include/gtest/internal/gtest-port.h: In function ‘int testing::internal::posix::IsATTY(int)’:
/home/user/src/example/build/gmock/src/gmock/googletest/include/gtest/internal/gtest-port.h:2341:45: error: ‘isatty’ was not declared in this scope
inline int IsATTY(int fd) { return isatty(fd); }
^
/home/user/src/example/build/gmock/src/gmock/googletest/include/gtest/internal/gtest-port.h: In function ‘int testing::internal::posix::RmDir(const char*)’:
/home/user/src/example/build/gmock/src/gmock/googletest/include/gtest/internal/gtest-port.h:2347:53: error: ‘rmdir’ was not declared in this scope
inline int RmDir(const char* dir) { return rmdir(dir); }
^
/home/user/src/example/build/gmock/src/gmock/googletest/include/gtest/internal/gtest-port.h: In function ‘int testing::internal::posix::ChDir(const char*)’:
/home/user/src/example/build/gmock/src/gmock/googletest/include/gtest/internal/gtest-port.h:2365:53: error: ‘chdir’ was not declared in this scope
inline int ChDir(const char* dir) { return chdir(dir); }
^
/home/user/src/example/build/gmock/src/gmock/googletest/include/gtest/internal/gtest-port.h: In function ‘int testing::internal::posix::Read(int, void*, unsigned int)’:
/home/user/src/example/build/gmock/src/gmock/googletest/include/gtest/internal/gtest-port.h:2379:46: error: ‘read’ was not declared in this scope
return static_cast<int>(read(fd, buf, count));
^
/home/user/src/example/build/gmock/src/gmock/googletest/include/gtest/internal/gtest-port.h: In function ‘int testing::internal::posix::Write(int, const void*, unsigned int)’:
/home/user/src/example/build/gmock/src/gmock/googletest/include/gtest/internal/gtest-port.h:2382:47: error: ‘write’ was not declared in this scope
return static_cast<int>(write(fd, buf, count));
^
/home/user/src/example/build/gmock/src/gmock/googletest/include/gtest/internal/gtest-port.h: In function ‘int testing::internal::posix::Close(int)’:
/home/user/src/example/build/gmock/src/gmock/googletest/include/gtest/internal/gtest-port.h:2384:43: error: ‘close’ was not declared in this scope
inline int Close(int fd) { return close(fd); }
^
Target/project/CMakeFiles/step_definition_runner.dir/build.make:62: recipe for target 'Target/project/CMakeFiles/step_definition_runner.dir/features/step_definitions/App_Steps.cpp.o' failed
make[2]: *** [Target/project/CMakeFiles/step_definition_runner.dir/features/step_definitions/App_Steps.cpp.o] Error 1
CMakeFiles/Makefile2:164: recipe for target 'Target/project/CMakeFiles/step_definition_runner.dir/all' failed
make[1]: *** [Target/project/CMakeFiles/step_definition_runner.dir/all] Error 2
Makefile:94: recipe for target 'all' failed
make: *** [all] Error 2
I'm using the FindGMock.cmake from the cucumber-cpp project to handle the GTest dependency.
In my CMakeLists.txt file I have:
add_executable(step_definition_runner
features/step_definitions/App_Steps.cpp
)
target_include_directories(step_definition_runner
PRIVATE
${GTEST_INCLUDE_DIRS}
)
target_link_libraries(step_definition_runner project-app ${GTEST_LIBRARIES})
I've tried many things, but a couple of note:
Including unistd.h before I include gtest/gtest.h.
Force including unistd.h inside gtest/gtest.h and gtest/internal/gtest-port.h.
Is there something obvious I'm missing?
It seems like you are not on windows OS.
These functions are allowed only for windows
Look for below content in
https://github.com/google/googletest/blob/master/googletest/include/gtest/internal/gtest-port.h
402 // Brings in definitions for functions used in the testing::internal::posix
403 // namespace (read, write, close, chdir, isatty, stat). We do not currently
404 // use them on Windows Mobile.
405 #if GTEST_OS_WINDOWS
406 # if !GTEST_OS_WINDOWS_MOBILE
407 # include <direct.h>
408 # include <io.h>
409 # endif

opencv_contrib compilation error: class has no member

I have to implement the SURF algorithm for image stitching. I was having trouble with the libraries, as listed here
After trying the solutions I could find, I removed the opencv and started to build from scratch. I tried to include the 'opencv_contrib' library during installation, but it didn't work.
So I installed opencv, and then tried to integrate the package as told int he github repository of the package. During the
make -j2
line, I keep getting the following error.
[ 77%] Building CXX object modules/ximgproc/CMakeFiles/opencv_ximgproc.dir/src/sparse_match_interpolators.cpp.o
In file included from /home/akshat/OpenCV/opencv-3.0.0/modules/core/include/opencv2/core.hpp:54:0,
from /home/akshat/OpenCV/opencv-3.0.0/build/modules/ximgproc/precomp.hpp:40:
/home/akshat/opencv_contrib/modules/ximgproc/src/sparse_match_interpolators.cpp: In member function ‘virtual void cv::ximgproc::EdgeAwareInterpolatorImpl::interpolate(cv::InputArray, cv::InputArray, cv::InputArray, cv::InputArray, cv::OutputArray)’:
/home/akshat/opencv_contrib/modules/ximgproc/src/sparse_match_interpolators.cpp:171:52: error: ‘const class cv::_InputArray’ has no member named ‘isVector’
CV_Assert( !from_points.empty() && from_points.isVector() &&
^
/home/akshat/OpenCV/opencv-3.0.0/modules/core/include/opencv2/core/base.hpp:389:33: note: in definition of macro ‘CV_Assert’
#define CV_Assert( expr ) if(!!(expr)) ; else cv::error( cv::Error::StsAssert, #expr, CV_Func, __FILE__, __LINE__ )
^
/home/akshat/opencv_contrib/modules/ximgproc/src/sparse_match_interpolators.cpp:172:52: error: ‘const class cv::_InputArray’ has no member named ‘isVector’
!to_points .empty() && to_points .isVector() &&
^
/home/akshat/OpenCV/opencv-3.0.0/modules/core/include/opencv2/core/base.hpp:389:33: note: in definition of macro ‘CV_Assert’
#define CV_Assert( expr ) if(!!(expr)) ; else cv::error( cv::Error::StsAssert, #expr, CV_Func, __FILE__, __LINE__ )
^
make[2]: *** [modules/ximgproc/CMakeFiles/opencv_ximgproc.dir/src/sparse_match_interpolators.cpp.o] Error 1
make[1]: *** [modules/ximgproc/CMakeFiles/opencv_ximgproc.dir/all] Error 2
make: *** [all] Error 2
Thanks in advance
/home/akshat/opencv_contrib/modules/ximgproc/src/sparse_match_interpolators.cpp:171:52: error: ‘const class cv::_InputArray’ has no member named ‘isVector’
testifies this is a version incompatibility. The code in ximgproc expects a different interface from cv (specifically, cv::_InputArray) than the one your stock one is providing.
Your options here are:
try the version of the opencv-contrib codebase that corresponds to your installed version of cv
make yet another attempt to build the newer cv that corresponds to your current opencv-contrib