cmake bug and compile error on Unix
Posted: Tue Oct 15, 2013 8:27 am
Hi,
I am trying to compile CloudCompare on my Mandriva system, but have run into a few problems. The first seems to be a mistake in the CMakeLists.txt in the trunk/qCC/plugins folder:
- the loop in this file is including the CMakeFiles folder => telling the loop to ignore this folder allows the configuration to run.
When compiling the code I get the following errors for file CC/CMakeFiles/CC_DLL.dir/src/PointProjectionTools.cpp.o:
Not sure how to fix this... Any help would be appreciated.
Thanks,
Dave
I am trying to compile CloudCompare on my Mandriva system, but have run into a few problems. The first seems to be a mistake in the CMakeLists.txt in the trunk/qCC/plugins folder:
- the loop in this file is including the CMakeFiles folder => telling the loop to ignore this folder allows the configuration to run.
When compiling the code I get the following errors for file CC/CMakeFiles/CC_DLL.dir/src/PointProjectionTools.cpp.o:
Code: Select all
[ 6%] Building CXX object CC/CMakeFiles/CC_DLL.dir/src/PointProjectionTools.cpp.o
/home/users/davidm/lbin/cloudcompare/trunk/trunk/CC/src/PointProjectionTools.cpp: In static member function ‘static bool CCLib::PointProjectionTools::extractConcaveHull2D(std::vector<CCLib::PointProjectionTools::IndexedCCVector2>&, std::list<CCLib::PointProjectionTools::IndexedCCVector2*>&, PointCoordinateType)’:
/home/users/davidm/lbin/cloudcompare/trunk/trunk/CC/src/PointProjectionTools.cpp:499:20: error: template argument for ‘template<class _Tp> class std::allocator’ uses local type ‘CCLib::PointProjectionTools::extractConcaveHull2D(std::vector<CCLib::PointProjectionTools::IndexedCCVector2>&, std::list<CCLib::PointProjectionTools::IndexedCCVector2*>&, PointCoordinateType)::flags’
/home/users/davidm/lbin/cloudcompare/trunk/trunk/CC/src/PointProjectionTools.cpp:499:20: error: trying to instantiate ‘template<class _Tp> class std::allocator’
/home/users/davidm/lbin/cloudcompare/trunk/trunk/CC/src/PointProjectionTools.cpp:499:20: error: template argument 2 is invalid
/home/users/davidm/lbin/cloudcompare/trunk/trunk/CC/src/PointProjectionTools.cpp:499:32: error: invalid type in declaration before ‘;’ token
/home/users/davidm/lbin/cloudcompare/trunk/trunk/CC/src/PointProjectionTools.cpp:502:15: error: request for member ‘resize’ in ‘pointFlags’, which is of non-class type ‘int’
/home/users/davidm/lbin/cloudcompare/trunk/trunk/CC/src/PointProjectionTools.cpp:540:30: error: invalid types ‘int[unsigned int]’ for array subscript
/home/users/davidm/lbin/cloudcompare/trunk/trunk/CC/src/PointProjectionTools.cpp:541:26: error: no matching function for call to ‘std::list<CCLib::PointProjectionTools::IndexedCCVector2*>::erase(std::list<CCLib::PointProjectionTools::IndexedCCVector2*>::const_iterator&)’
/home/users/davidm/lbin/cloudcompare/trunk/trunk/CC/src/PointProjectionTools.cpp:541:26: note: candidates are:
/usr/lib/gcc/x86_64-mageia-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/list.tcc:109:5: note: std::list<_Tp, _Alloc>::iterator std::list<_Tp, _Alloc>::erase(std::list<_Tp, _Alloc>::iterator) [with _Tp = CCLib::PointProjectionTools::IndexedCCVector2*, _Alloc = std::allocator<CCLib::PointProjectionTools::IndexedCCVector2*>, std::list<_Tp, _Alloc>::iterator = std::_List_iterator<CCLib::PointProjectionTools::IndexedCCVector2*>]
/usr/lib/gcc/x86_64-mageia-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/list.tcc:109:5: note: no known conversion for argument 1 from ‘std::list<CCLib::PointProjectionTools::IndexedCCVector2*>::const_iterator {aka std::_List_const_iterator<CCLib::PointProjectionTools::IndexedCCVector2*>}’ to ‘std::_List_iterator<CCLib::PointProjectionTools::IndexedCCVector2*>’
/usr/lib/gcc/x86_64-mageia-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stl_list.h:1160:7: note: std::list<_Tp, _Alloc>::iterator std::list<_Tp, _Alloc>::erase(std::list<_Tp, _Alloc>::iterator, std::list<_Tp, _Alloc>::iterator) [with _Tp = CCLib::PointProjectionTools::IndexedCCVector2*, _Alloc = std::allocator<CCLib::PointProjectionTools::IndexedCCVector2*>, std::list<_Tp, _Alloc>::iterator = std::_List_iterator<CCLib::PointProjectionTools::IndexedCCVector2*>]
/usr/lib/gcc/x86_64-mageia-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stl_list.h:1160:7: note: candidate expects 2 arguments, 1 provided
/home/users/davidm/lbin/cloudcompare/trunk/trunk/CC/src/PointProjectionTools.cpp:566:29: error: invalid types ‘int[unsigned int]’ for array subscript
/home/users/davidm/lbin/cloudcompare/trunk/trunk/CC/src/PointProjectionTools.cpp:591:28: error: invalid types ‘int[const unsigned int]’ for array subscript
/home/users/davidm/lbin/cloudcompare/trunk/trunk/CC/src/PointProjectionTools.cpp:617:28: error: invalid types ‘int[const unsigned int]’ for array subscript
/home/users/davidm/lbin/cloudcompare/trunk/trunk/CC/src/PointProjectionTools.cpp:626:26: error: invalid types ‘int[const unsigned int]’ for array subscript
/home/users/davidm/lbin/cloudcompare/trunk/trunk/CC/src/PointProjectionTools.cpp:689:98: error: no matching function for call to ‘std::list<CCLib::PointProjectionTools::IndexedCCVector2*>::insert(std::list<CCLib::PointProjectionTools::IndexedCCVector2*>::const_iterator, CCLib::PointProjectionTools::IndexedCCVector2*)’
/home/users/davidm/lbin/cloudcompare/trunk/trunk/CC/src/PointProjectionTools.cpp:689:98: note: candidates are:
/usr/lib/gcc/x86_64-mageia-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/list.tcc:99:5: note: std::list<_Tp, _Alloc>::iterator std::list<_Tp, _Alloc>::insert(std::list<_Tp, _Alloc>::iterator, const value_type&) [with _Tp = CCLib::PointProjectionTools::IndexedCCVector2*, _Alloc = std::allocator<CCLib::PointProjectionTools::IndexedCCVector2*>, std::list<_Tp, _Alloc>::iterator = std::_List_iterator<CCLib::PointProjectionTools::IndexedCCVector2*>, std::list<_Tp, _Alloc>::value_type = CCLib::PointProjectionTools::IndexedCCVector2*]
/usr/lib/gcc/x86_64-mageia-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/list.tcc:99:5: note: no known conversion for argument 1 from ‘std::list<CCLib::PointProjectionTools::IndexedCCVector2*>::const_iterator {aka std::_List_const_iterator<CCLib::PointProjectionTools::IndexedCCVector2*>}’ to ‘std::_List_iterator<CCLib::PointProjectionTools::IndexedCCVector2*>’
/usr/lib/gcc/x86_64-mageia-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stl_list.h:1095:7: note: void std::list<_Tp, _Alloc>::insert(std::list<_Tp, _Alloc>::iterator, std::list<_Tp, _Alloc>::size_type, const value_type&) [with _Tp = CCLib::PointProjectionTools::IndexedCCVector2*, _Alloc = std::allocator<CCLib::PointProjectionTools::IndexedCCVector2*>, std::list<_Tp, _Alloc>::iterator = std::_List_iterator<CCLib::PointProjectionTools::IndexedCCVector2*>, std::list<_Tp, _Alloc>::size_type = long unsigned int, std::list<_Tp, _Alloc>::value_type = CCLib::PointProjectionTools::IndexedCCVector2*]
/usr/lib/gcc/x86_64-mageia-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stl_list.h:1095:7: note: candidate expects 3 arguments, 2 provided
/usr/lib/gcc/x86_64-mageia-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stl_list.h:1116:9: note: template<class _InputIterator> void std::list::insert(std::list<_Tp, _Alloc>::iterator, _InputIterator, _InputIterator) [with _InputIterator = _InputIterator, _Tp = CCLib::PointProjectionTools::IndexedCCVector2*, _Alloc = std::allocator<CCLib::PointProjectionTools::IndexedCCVector2*>, std::list<_Tp, _Alloc>::iterator = std::_List_iterator<CCLib::PointProjectionTools::IndexedCCVector2*>]
/home/users/davidm/lbin/cloudcompare/trunk/trunk/CC/src/PointProjectionTools.cpp:711:29: error: invalid types ‘int[const unsigned int]’ for array subscript
make[2]: *** [CC/CMakeFiles/CC_DLL.dir/src/PointProjectionTools.cpp.o] Error 1
make[1]: *** [CC/CMakeFiles/CC_DLL.dir/all] Error 2
make: *** [all] Error 2
Thanks,
Dave