gPb icon indicating copy to clipboard operation
gPb copied to clipboard

Can't compile the file

Open Jangelaw opened this issue 8 years ago • 4 comments

Hi all,

When I compile this file, I met the problem with 'Cannot open include file: 'collections/pointers/auto_collection.hh': No such file or directory' Can anyone help me with this issue?

Jangelaw avatar Jul 24 '17 16:07 Jangelaw

Another problem is :

mex_contour_sides.cc ./include\math/matrices/matrix.hh(1277): error C3771: 'resize': friend declaration cannot be found in the nearest namespace scope ./include\math/matrices/matrix.hh(1610): note: see reference to class template instantiation 'math::matrices::matrix<T,Syn>' being compiled ./include\math/matrices/matrix.hh(1277): error C2143: syntax error: missing ';' before '<' ./include\math/matrices/matrix.hh(1277): error C2460: 'math::matrices::resize': uses 'math::matrices::matrix<T,Syn>', which is being defined ./include\math/matrices/matrix.hh(126): note: see declaration of 'math::matrices::matrix<T,Syn>' ./include\math/matrices/matrix.hh(1277): error C2433: 'math::matrices::resize': 'friend' not permitted on data declarations ./include\math/matrices/matrix.hh(1277): error C2365: 'math::matrices::resize': redefinition; previous definition was 'function' ./include\math/matrices/matrix.hh(1280): error C2238: unexpected token(s) preceding ';' ./include\math/matrices/matrix.hh(1282): error C3771: 'resize': friend declaration cannot be found in the nearest namespace scope ./include\math/matrices/matrix.hh(1282): error C2143: syntax error: missing ';' before '<' ./include\math/matrices/matrix.hh(1282): error C2460: 'math::matrices::resize': uses 'math::matrices::matrix<T,Syn>', which is being defined ./include\math/matrices/matrix.hh(126): note: see declaration of 'math::matrices::matrix<T,Syn>' ./include\math/matrices/matrix.hh(1282): error C2433: 'math::matrices::resize': 'friend' not permitted on data declarations ./include\math/matrices/matrix.hh(1282): error C2365: 'math::matrices::resize': redefinition; previous definition was 'function' ./include\math/matrices/matrix.hh(1286): error C2238: unexpected token(s) preceding ';' ./include\math/matrices/matrix.hh(1292): error C3771: 'resize': friend declaration cannot be found in the nearest namespace scope ./include\math/matrices/matrix.hh(1292): error C2143: syntax error: missing ';' before '<' ./include\math/matrices/matrix.hh(1292): error C2460: 'math::matrices::resize': uses 'math::matrices::matrix<T,Syn>', which is being defined ./include\math/matrices/matrix.hh(126): note: see declaration of 'math::matrices::matrix<T,Syn>' ./include\math/matrices/matrix.hh(1292): error C2433: 'math::matrices::resize': 'friend' not permitted on data declarations ./include\math/matrices/matrix.hh(1292): error C2365: 'math::matrices::resize': redefinition; previous definition was 'function' ./include\math/matrices/matrix.hh(1296): error C2238: unexpected token(s) preceding ';' ./include\math/matrices/matrix.hh(1298): error C3771: 'resize': friend declaration cannot be found in the nearest namespace scope ./include\math/matrices/matrix.hh(1298): error C2143: syntax error: missing ';' before '<' ./include\math/matrices/matrix.hh(1298): error C2460: 'math::matrices::resize': uses 'math::matrices::matrix<T,Syn>', which is being defined ./include\math/matrices/matrix.hh(126): note: see declaration of 'math::matrices::matrix<T,Syn>' ./include\math/matrices/matrix.hh(1298): error C2433: 'math::matrices::resize': 'friend' not permitted on data declarations ./include\math/matrices/matrix.hh(1298): error C2365: 'math::matrices::resize': redefinition; previous definition was 'function' ./include\math/matrices/matrix.hh(1303): error C2238: unexpected token(s) preceding ';' ./include\math/matrices/matrix.hh(1310): error C3771: 'resize': friend declaration cannot be found in the nearest namespace scope ./include\math/matrices/matrix.hh(1310): error C2143: syntax error: missing ';' before '<' ./include\math/matrices/matrix.hh(1310): error C2460: 'math::matrices::resize': uses 'math::matrices::matrix<T,Syn>', which is being defined ./include\math/matrices/matrix.hh(126): note: see declaration of 'math::matrices::matrix<T,Syn>' ./include\math/matrices/matrix.hh(1310): error C2433: 'math::matrices::resize': 'friend' not permitted on data declarations ./include\math/matrices/matrix.hh(1310): error C2365: 'math::matrices::resize': redefinition; previous definition was 'function' ./include\math/matrices/matrix.hh(1313): error C2238: unexpected token(s) preceding ';' ./include\math/matrices/matrix.hh(1315): error C3771: 'resize': friend declaration cannot be found in the nearest namespace scope ./include\math/matrices/matrix.hh(1315): error C2143: syntax error: missing ';' before '<' ./include\math/matrices/matrix.hh(1315): error C2460: 'math::matrices::resize': uses 'math::matrices::matrix<T,Syn>', which is being defined ./include\math/matrices/matrix.hh(126): note: see declaration of 'math::matrices::matrix<T,Syn>' ./include\math/matrices/matrix.hh(1315): error C2433: 'math::matrices::resize': 'friend' not permitted on data declarations ./include\math/matrices/matrix.hh(1315): error C2365: 'math::matrices::resize': redefinition; previous definition was 'function' ./include\math/matrices/matrix.hh(1319): error C2238: unexpected token(s) preceding ';' ./include\math/matrices/cmatrix.hh(903): error C2143: syntax error: missing ';' before '<' ./include\math/matrices/cmatrix.hh(1638): note: see reference to class template instantiation 'math::matrices::cmatrix<T,Syn>' being compiled ./include\math/matrices/cmatrix.hh(903): error C2460: 'math::matrices::+': uses 'math::matrices::cmatrix<T,Syn>', which is being defined ./include\math/matrices/matrix.hh(234): note: see declaration of 'math::matrices::cmatrix<T,Syn>' ./include\math/matrices/cmatrix.hh(903): error C2433: 'math::matrices::+': 'friend' not permitted on data declarations ./include\math/matrices/cmatrix.hh(903): error C2473: 'operator +': looks like a function definition, but there is no parameter list. ./include\math/matrices/cmatrix.hh(903): error C2365: 'math::matrices::operator +': redefinition; previous definition was 'function' ./include\math/matrices/cmatrix.hh(903): error C2238: unexpected token(s) preceding ';' ./include\math/matrices/cmatrix.hh(904): error C2143: syntax error: missing ';' before '<' ./include\math/matrices/cmatrix.hh(904): error C2460: 'math::matrices::-': uses 'math::matrices::cmatrix<T,Syn>', which is being defined ./include\math/matrices/matrix.hh(234): note: see declaration of 'math::matrices::cmatrix<T,Syn>' ./include\math/matrices/cmatrix.hh(904): error C2433: 'math::matrices::-': 'friend' not permitted on data declarations ./include\math/matrices/cmatrix.hh(904): error C2473: 'operator -': looks like a function definition, but there is no parameter list. ./include\math/matrices/cmatrix.hh(904): error C2365: 'math::matrices::operator -': redefinition; previous definition was 'function' ./include\math/matrices/cmatrix.hh(904): error C2238: unexpected token(s) preceding ';' ./include\math/matrices/cmatrix.hh(908): error C2143: syntax error: missing ';' before '<' ./include\math/matrices/cmatrix.hh(908): error C2460: 'math::matrices::+': uses 'math::matrices::cmatrix<T,Syn>', which is being defined ./include\math/matrices/matrix.hh(234): note: see declaration of 'math::matrices::cmatrix<T,Syn>' ./include\math/matrices/cmatrix.hh(908): error C2433: 'math::matrices::+': 'friend' not permitted on data declarations ./include\math/matrices/cmatrix.hh(908): error C2473: 'operator +': looks like a function definition, but there is no parameter list. ./include\math/matrices/cmatrix.hh(908): error C2365: 'math::matrices::operator +': redefinition; previous definition was 'function' ./include\math/matrices/cmatrix.hh(908): error C2238: unexpected token(s) preceding ';' ./include\math/matrices/cmatrix.hh(909): error C2143: syntax error: missing ';' before '<' ./include\math/matrices/cmatrix.hh(909): error C2460: 'math::matrices::-': uses 'math::matrices::cmatrix<T,Syn>', which is being defined ./include\math/matrices/matrix.hh(234): note: see declaration of 'math::matrices::cmatrix<T,Syn>' ./include\math/matrices/cmatrix.hh(909): error C2433: 'math::matrices::-': 'friend' not permitted on data declarations ./include\math/matrices/cmatrix.hh(909): error C2473: 'operator -': looks like a function definition, but there is no parameter list. ./include\math/matrices/cmatrix.hh(909): error C2365: 'math::matrices::operator -': redefinition; previous definition was 'function' ./include\math/matrices/cmatrix.hh(909): error C2238: unexpected token(s) preceding ';' ./include\math/matrices/cmatrix.hh(917): error C2143: syntax error: missing ';' before '<' ./include\math/matrices/cmatrix.hh(917): error C2460: 'math::matrices::+': uses 'math::matrices::cmatrix<T,Syn>', which is being defined ./include\math/matrices/matrix.hh(234): note: see declaration of 'math::matrices::cmatrix<T,Syn>' ./include\math/matrices/cmatrix.hh(917): error C2433: 'math::matrices::+': 'friend' not permitted on data declarations ./include\math/matrices/cmatrix.hh(917): error C2473: 'operator +': looks like a function definition, but there is no parameter list. ./include\math/matrices/cmatrix.hh(917): error C2365: 'math::matrices::operator +': redefinition; previous definition was 'function' ./include\math/matrices/cmatrix.hh(917): error C2238: unexpected token(s) preceding ';' ./include\math/matrices/cmatrix.hh(919): error C2143: syntax error: missing ';' before '<' ./include\math/matrices/cmatrix.hh(919): error C2460: 'math::matrices::-': uses 'math::matrices::cmatrix<T,Syn>', which is being defined ./include\math/matrices/matrix.hh(234): note: see declaration of 'math::matrices::cmatrix<T,Syn>' ./include\math/matrices/cmatrix.hh(919): error C2433: 'math::matrices::-': 'friend' not permitted on data declarations ./include\math/matrices/cmatrix.hh(919): error C2473: 'operator -': looks like a function definition, but there is no parameter list. ./include\math/matrices/cmatrix.hh(919): error C2365: 'math::matrices::operator -': redefinition; previous definition was 'function' ./include\math/matrices/cmatrix.hh(919): error C2238: unexpected token(s) preceding ';' ./include\math/matrices/cmatrix.hh(926): error C2143: syntax error: missing ';' before '<' ./include\math/matrices/cmatrix.hh(926): error C2460: 'math::matrices::+': uses 'math::matrices::cmatrix<T,Syn>', which is being defined ./include\math/matrices/matrix.hh(234): note: see declaration of 'math::matrices::cmatrix<T,Syn>' ./include\math/matrices/cmatrix.hh(926): error C2433: 'math::matrices::+': 'friend' not permitted on data declarations ./include\math/matrices/cmatrix.hh(926): error C2473: 'operator +': looks like a function definition, but there is no parameter list. ./include\math/matrices/cmatrix.hh(926): error C2365: 'math::matrices::operator +': redefinition; previous definition was 'function' ./include\math/matrices/cmatrix.hh(926): error C2238: unexpected token(s) preceding ';' ./include\math/matrices/cmatrix.hh(928): error C2143: syntax error: missing ';' before '<' ./include\math/matrices/cmatrix.hh(928): error C2460: 'math::matrices::-': uses 'math::matrices::cmatrix<T,Syn>', which is being defined ./include\math/matrices/matrix.hh(234): note: see declaration of 'math::matrices::cmatrix<T,Syn>' ./include\math/matrices/cmatrix.hh(928): error C2433: 'math::matrices::-': 'friend' not permitted on data declarations ./include\math/matrices/cmatrix.hh(928): error C2473: 'operator -': looks like a function definition, but there is no parameter list. ./include\math/matrices/cmatrix.hh(928): error C2365: 'math::matrices::operator -': redefinition; previous definition was 'function' ./include\math/matrices/cmatrix.hh(928): error C2238: unexpected token(s) preceding ';' ./include\math/matrices/cmatrix.hh(938): error C2143: syntax error: missing ';' before '<' ./include\math/matrices/cmatrix.hh(938): error C2460: 'math::matrices::+': uses 'math::matrices::cmatrix<T,Syn>', which is being defined ./include\math/matrices/matrix.hh(234): note: see declaration of 'math::matrices::cmatrix<T,Syn>' ./include\math/matrices/cmatrix.hh(938): error C2433: 'math::matrices::+': 'friend' not permitted on data declarations ./include\math/matrices/cmatrix.hh(938): error C2473: 'operator +': looks like a function definition, but there is no parameter list. ./include\math/matrices/cmatrix.hh(938): error C2365: 'math::matrices::operator +': redefinition; previous definition was 'function' ./include\math/matrices/cmatrix.hh(938): error C2238: unexpected token(s) preceding ';' ./include\math/matrices/cmatrix.hh(940): error C2143: syntax error: missing ';' before '<' ./include\math/matrices/cmatrix.hh(940): error C2460: 'math::matrices::-': uses 'math::matrices::cmatrix<T,Syn>', which is being defined ./include\math/matrices/matrix.hh(234): note: see declaration of 'math::matrices::cmatrix<T,Syn>' ./include\math/matrices/cmatrix.hh(940): error C2433: 'math::matrices::-': 'friend' not permitted on data declarations ./include\math/matrices/cmatrix.hh(940): error C2473: 'operator -': looks like a function definition, but there is no parameter list. ./include\math/matrices/cmatrix.hh(940): error C2365: 'math::matrices::operator -': redefinition; previous definition was 'function' ./include\math/matrices/cmatrix.hh(940): error C2238: unexpected token(s) preceding ';' ./include\math/matrices/cmatrix.hh(947): error C2143: syntax error: missing ';' before '<' ./include\math/matrices/cmatrix.hh(947): error C2460: 'math::matrices::+': uses 'math::matrices::cmatrix<T,Syn>', which is being defined ./include\math/matrices/matrix.hh(234): note: see declaration of 'math::matrices::cmatrix<T,Syn>' ./include\math/matrices/cmatrix.hh(947): error C2433: 'math::matrices::+': 'friend' not permitted on data declarations ./include\math/matrices/cmatrix.hh(947): error C2473: 'operator +': looks like a function definition, but there is no parameter list. ./include\math/matrices/cmatrix.hh(947): error C2365: 'math::matrices::operator +': redefinition; previous definition was 'function' ./include\math/matrices/cmatrix.hh(947): fatal error C1003: error count exceeds 100; stopping compilation

Looking for help here!

Jangelaw avatar Jul 25 '17 10:07 Jangelaw

Please give more information: what instructions are you running ? (the ones from the README ?). Which OpenCV do you have installed ?

vrabaud avatar Aug 06 '17 14:08 vrabaud

I just run the 'compile.m' file. My working environment is win7 and Opencv 2.4

Jangelaw avatar Aug 09 '17 13:08 Jangelaw

I have met the same problem. Do you find the way to solve this problem?

Althindor avatar Apr 11 '19 00:04 Althindor