CMRep Compiling Error

27 views
Skip to first unread message

Xiaoying Guo

unread,
Jun 15, 2018, 4:33:08 PM6/15/18
to DTI-TK
Hi,

I am currently trying to compile cm-rep using cmake but am running into an assortment of errors. After reading other advice I am using ITK 4.5.2 and vtk 6.1.0 rather than the most recent versions. 

My errors seem to refer to the actual code itself so I am at a loss as to how to address them. Does anyone have any advice on how to proceed? I have attached the error messages below.




[ 77%] Building CXX object src/util/CMakeFiles/warpmesh.dir/WarpMeshBackwards.cxx.o
/home/jtanedo/Software/CMRep/cmrep-master/src/util/WarpMeshBackwards.cxx: In function ‘int main(int, char**)’:
/home/jtanedo/Software/CMRep/cmrep-master/src/util/WarpMeshBackwards.cxx:456:41: error: ‘getopt’ was not declared in this scope
   while ((ch = getopt(argc, argv, "m:w:")) != -1)
                                         ^
/home/jtanedo/Software/CMRep/cmrep-master/src/util/WarpMeshBackwards.cxx:460:30: error: ‘optarg’ was not declared in this scope
     case 'm': if(!scan_coord(optarg, parm.mesh_coord) || parm.mesh_coord==ANTS)
                              ^
/home/jtanedo/Software/CMRep/cmrep-master/src/util/WarpMeshBackwards.cxx:463:30: error: ‘optarg’ was not declared in this scope
     case 'w': if(!scan_coord(optarg, parm.warp_coord))
                              ^
/home/jtanedo/Software/CMRep/cmrep-master/src/util/WarpMeshBackwards.cxx:471:6: error: ‘optind’ was not declared in this scope
   if(optind + 5 != argc && optind + 3 != argc) return usage();
      ^
/home/jtanedo/Software/CMRep/cmrep-master/src/util/WarpMeshBackwards.cxx:472:24: error: ‘optind’ was not declared in this scope
   parm.fnMeshIn = argv[optind++];
                        ^
make[2]: *** [src/util/CMakeFiles/warpmesh.dir/WarpMeshBackwards.cxx.o] Error 1
make[2]: Target `src/util/CMakeFiles/warpmesh.dir/build' not remade because of errors.
make[1]: *** [src/util/CMakeFiles/warpmesh.dir/all] Error 2
Scanning dependencies of target vtklevelset
[ 78%] Building CXX object src/util/CMakeFiles/vtklevelset.dir/RealImageToMesh.cxx.o
[ 79%] Building CXX object src/util/CMakeFiles/vtklevelset.dir/ReadWriteVTK.cxx.o
[ 80%] Linking CXX executable vtklevelset
../../libcmrep.a(ScriptInterface.cxx.o): In function `MedialPDE::ConjugateGradientOptimizationTOMS(MedialOptimizationProblem*, vnl_vector<double>&, unsigned int, double)':
ScriptInterface.cxx:(.text+0x149e): undefined reference to `deflt_'
ScriptInterface.cxx:(.text+0x1525): undefined reference to `sumsl_'
collect2: error: ld returned 1 exit status
make[2]: *** [src/util/vtklevelset] Error 1
make[2]: Target `src/util/CMakeFiles/vtklevelset.dir/build' not remade because of errors.
make[1]: *** [src/util/CMakeFiles/vtklevelset.dir/all] Error 2
Scanning dependencies of target meshglm

...

make[1]: Target `all' not remade because of errors.
make: *** [all] Error 2
make: Target `default_target' not remade because of errors.
Reply all
Reply to author
Forward
0 new messages