Run GCO_UnitTest in windows
Is it possible to use this library in windows? I got the following error when compiling the library.
`Error using mex
C:\gco\GCoptimization.cpp:18:0: warning: "NOMINMAX" redefined
#define NOMINMAX
^
In file included from C:/MATLAB/SupportPackages/R2015b/MW_MinGW_4_9/lib/gcc/x86_64-w64-mingw32/4.9.2/include/c++/x86_64-w64-mingw32/bits/c++config.h:430:0,
from C:/MATLAB/SupportPackages/R2015b/MW_MinGW_4_9/lib/gcc/x86_64-w64-mingw32/4.9.2/include/c++/bits/stl_algobase.h:59,
from C:/MATLAB/SupportPackages/R2015b/MW_MinGW_4_9/lib/gcc/x86_64-w64-mingw32/4.9.2/include/c++/vector:60,
from C:\gco\GCoptimization.cpp:8:
C:/MATLAB/SupportPackages/R2015b/MW_MinGW_4_9/lib/gcc/x86_64-w64-mingw32/4.9.2/include/c++/x86_64-w64-mingw32/bits/os_defines.h:45:0: note: this is the
location of the previous definition
#define NOMINMAX 1
^
C:\gco\GCoptimization.cpp:20:23: warning: 'GCO_CLOCKS_PER_SEC' initialized and declared 'extern'
extern "C" gcoclock_t GCO_CLOCKS_PER_SEC = 0;
^
In file included from C:\gco\GCoptimization.h:108:0,
from C:\gco\GCoptimization.cpp:4:
C:\gco\energy.h: In instantiation of 'int Energy<captype, tcaptype, flowtype>::get_var(Energy<captype, tcaptype, flowtype>::Var) [with captype = double;
tcaptype = double; flowtype = double; Energy<captype, tcaptype, flowtype>::Var = int]':
C:\gco\GCoptimization.cpp:197:20: required from here
C:\gco\energy.h:328:91: error: 'what_segment' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of
instantiation [-fpermissive]
inline int Energy<captype,tcaptype,flowtype>::get_var(Var x) { return (int) what_segment(x); }
^
C:\gco\energy.h:328:91: note: declarations in dependent base 'Graph<double, double, double>' are not found by unqualified lookup
C:\gco\energy.h:328:91: note: use 'this->what_segment' instead
C:\gco\energy.h: In instantiation of 'void Energy<captype, tcaptype, flowtype>::add_term1(Energy<captype, tcaptype, flowtype>::Var, Energy<captype, tcaptype,
flowtype>::Value, Energy<captype, tcaptype, flowtype>::Value) [with captype = double; tcaptype = double; flowtype = double; Energy<captype, tcaptype,
flowtype>::Var = int; Energy<captype, tcaptype, flowtype>::Value = double]':
C:\gco\GCoptimization.cpp:280:22: required from here
C:\gco\energy.h:207:22: error: 'add_tweights' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of
instantiation [-fpermissive]
add_tweights(x, B, A);
^
C:\gco\energy.h:207:22: note: declarations in dependent base 'Graph<double, double, double>' are not found by unqualified lookup
C:\gco\energy.h:207:22: note: use 'this->add_tweights' instead
C:\gco\energy.h: In instantiation of 'void Energy<captype, tcaptype, flowtype>::add_term2(Energy<captype, tcaptype, flowtype>::Var, Energy<captype, tcaptype,
flowtype>::Var, Energy<captype, tcaptype, flowtype>::Value, Energy<captype, tcaptype, flowtype>::Value, Energy<captype, tcaptype, flowtype>::Value,
Energy<captype, tcaptype, flowtype>::Value) [with captype = double; tcaptype = double; flowtype = double; Energy<captype, tcaptype, flowtype>::Var = int;
Energy<captype, tcaptype, flowtype>::Value = double]':
C:\gco\GCoptimization.cpp:304:42: required from here
C:\gco\energy.h:220:22: error: 'add_tweights' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of
instantiation [-fpermissive]
add_tweights(x, D, A);
^
C:\gco\energy.h:220:22: note: declarations in dependent base 'Graph<double, double, double>' are not found by unqualified lookup
C:\gco\energy.h:220:22: note: use 'this->add_tweights' instead
C:\gco\energy.h:235:23: error: 'add_tweights' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of
instantiation [-fpermissive]
add_tweights(x, 0, B); /* first term /
^
C:\gco\energy.h:235:23: note: declarations in dependent base 'Graph<double, double, double>' are not found by unqualified lookup
C:\gco\energy.h:235:23: note: use 'this->add_tweights' instead
C:\gco\energy.h:236:24: error: 'add_tweights' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of
instantiation [-fpermissive]
add_tweights(y, 0, -B); / second term /
^
C:\gco\energy.h:236:24: note: declarations in dependent base 'Graph<double, double, double>' are not found by unqualified lookup
C:\gco\energy.h:236:24: note: use 'this->add_tweights' instead
C:\gco\energy.h:237:24: error: 'add_edge' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of
instantiation [-fpermissive]
add_edge(x, y, 0, B+C); / third term /
^
C:\gco\energy.h:237:24: note: declarations in dependent base 'Graph<double, double, double>' are not found by unqualified lookup
C:\gco\energy.h:237:24: note: use 'this->add_edge' instead
C:\gco\energy.h:245:24: error: 'add_tweights' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of
instantiation [-fpermissive]
add_tweights(x, 0, -C); / first term /
^
C:\gco\energy.h:245:24: note: declarations in dependent base 'Graph<double, double, double>' are not found by unqualified lookup
C:\gco\energy.h:245:24: note: use 'this->add_tweights' instead
C:\gco\energy.h:246:23: error: 'add_tweights' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of
instantiation [-fpermissive]
add_tweights(y, 0, C); / second term /
^
C:\gco\energy.h:246:23: note: declarations in dependent base 'Graph<double, double, double>' are not found by unqualified lookup
C:\gco\energy.h:246:23: note: use 'this->add_tweights' instead
C:\gco\energy.h:247:24: error: 'add_edge' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of
instantiation [-fpermissive]
add_edge(x, y, B+C, 0); / third term /
^
C:\gco\energy.h:247:24: note: declarations in dependent base 'Graph<double, double, double>' are not found by unqualified lookup
C:\gco\energy.h:247:24: note: use 'this->add_edge' instead
C:\gco\energy.h:251:22: error: 'add_edge' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of
instantiation [-fpermissive]
add_edge(x, y, B, C);
^
C:\gco\energy.h:251:22: note: declarations in dependent base 'Graph<double, double, double>' are not found by unqualified lookup
C:\gco\energy.h:251:22: note: use 'this->add_edge' instead
In file included from C:\gco\GCoptimization.h:109:0,
from C:\gco\GCoptimization.cpp:4:
C:\gco\graph.cpp: In instantiation of 'Graph<captype, tcaptype, flowtype>::Graph(int, int, void ()(char_)) [with captype = double; tcaptype = double;
flowtype = double]':
C:\gco\energy.h:187:189: required from 'Energy<captype, tcaptype, flowtype>::Energy(int, int, void ()(char)) [with captype = double; tcaptype = double;
flowtype = double]'
C:\gco\GCoptimization.cpp:1230:33: required from here
C:\gco\graph.cpp:21:83: warning: deprecated conversion from string constant to 'char_' [-Wwrite-strings]
if (!nodes || !arcs) { if (error_function) (error_function)("Not enough memory!"); exit(1); }
^
In file included from C:\gco\GCoptimization.h:110:0,
from C:\gco\GCoptimization.cpp:4:
C:\gco\maxflow.cpp: In instantiation of 'flowtype Graph<captype, tcaptype, flowtype>::maxflow(bool, Block
Error in GCO_BuildLib (line 68) eval(mexcmd); % compile and link in one step
Error in GCO_UnitTest (line 48) GCO_BuildLib; disp('BuildLib PASSED'); `
Active development of IRTK has now moved to the MIRTK project.