Issue with compilation

preeti gupta preetigupta25 at gmail.com
Tue Oct 30 21:33:10 UTC 2012


Hello,

I am trying to compile with g++.

However I end up getting these errors all the time

g++ -I.. -Wall -ansi -pedantic -g -O2 -o test_kdtree test_kdtree.cpp
In file included from
/usr/lib/gcc/x86_64-redhat-linux/4.7.0/../../../../include/c++/4.7.0/ext/hash_map:61:0,
                 from common/include/types.hpp:15,
                 from common/config.hpp:20,
                 from common/serialization_buffer.hpp:19,
                 from kdtree.hpp:86,
                 from test_kdtree.cpp:6:
/usr/lib/gcc/x86_64-redhat-linux/4.7.0/../../../../include/c++/4.7.0/backward/backward_warning.h:33:2:
warning: #warning This file includes at least one deprecated or antiquated
header which may be removed without further notice at a future date. Please
use a non-deprecated interface with equivalent functionality instead. For a
listing of replacement headers and interfaces, consult the file
backward_warning.h. To disable this warning use -Wno-deprecated. [-Wcpp]
In file included from allocator.hpp:12:0,
                 from kdtree.hpp:81,
                 from test_kdtree.cpp:6:
node.hpp:93:20: error: ‘serialization_buffer’ has not been declared
node.hpp:106:20: error: ‘serialization_buffer’ has not been declared
node.hpp: In member function ‘void KDTree::_Node<_Val>::_encode(int&)’:
node.hpp:102:11: error: request for member ‘push_back’ in ‘save_buf’, which
is of non-class type ‘int’
node.hpp: In member function ‘void KDTree::_Node<_Val>::_decode(int&)’:
node.hpp:108:40: error: request for member ‘front_length’ in ‘load_buf’,
which is of non-class type ‘int’
node.hpp:112:11: error: request for member ‘copy_front’ in ‘load_buf’,
which is of non-class type ‘int’
node.hpp:113:11: error: request for member ‘pop_front’ in ‘load_buf’, which
is of non-class type ‘int’
In file included from common/config.hpp:20:0,
                 from common/serialization_buffer.hpp:19,
                 from kdtree.hpp:86,
                 from test_kdtree.cpp:6:
common/include/types.hpp: At global scope:
common/include/types.hpp:37:17: warning: comma at end of enumerator list
[-pedantic]
In file included from test_kdtree.cpp:6:0:
kdtree.hpp: In instantiation of ‘KDTree::_Node<_Val>* KDTree::KDTree<__K,
_Val, _Acc, _Dist, _Cmp, _Alloc>::_M_new_node(KDTree::KDTree<__K, _Val,
_Acc, _Dist, _Cmp, _Alloc>::const_reference, KDTree::KDTree<__K, _Val,
_Acc, _Dist, _Cmp, _Alloc>::_Base_ptr, KDTree::KDTree<__K, _Val, _Acc,
_Dist, _Cmp, _Alloc>::_Base_ptr, KDTree::KDTree<__K, _Val, _Acc, _Dist,
_Cmp, _Alloc>::_Base_ptr) [with long unsigned int __K = 3ul; _Val =
triplet; _Acc = std::pointer_to_binary_function<triplet, long unsigned int,
double>; _Dist = KDTree::squared_difference<double, double>; _Cmp =
std::less<double>; _Alloc = std::allocator<KDTree::_Node<triplet> >;
KDTree::KDTree<__K, _Val, _Acc, _Dist, _Cmp, _Alloc>::_Link_type =
KDTree::_Node<triplet>*; KDTree::KDTree<__K, _Val, _Acc, _Dist, _Cmp,
_Alloc>::const_reference = const triplet&; KDTree::KDTree<__K, _Val, _Acc,
_Dist, _Cmp, _Alloc>::value_type = triplet; KDTree::KDTree<__K, _Val, _Acc,
_Dist, _Cmp, _Alloc>::_Base_ptr = KDTree::_Node_base*]’:
kdtree.hpp:326:57:   required from ‘KDTree::KDTree<__K, _Val, _Acc, _Dist,
_Cmp, _Alloc>::iterator KDTree::KDTree<__K, _Val, _Acc, _Dist, _Cmp,
_Alloc>::insert(KDTree::KDTree<__K, _Val, _Acc, _Dist, _Cmp,
_Alloc>::const_reference) [with long unsigned int __K = 3ul; _Val =
triplet; _Acc = std::pointer_to_binary_function<triplet, long unsigned int,
double>; _Dist = KDTree::squared_difference<double, double>; _Cmp =
std::less<double>; _Alloc = std::allocator<KDTree::_Node<triplet> >;
KDTree::KDTree<__K, _Val, _Acc, _Dist, _Cmp, _Alloc>::iterator =
KDTree::_Iterator<triplet, const triplet&, const triplet*>;
KDTree::KDTree<__K, _Val, _Acc, _Dist, _Cmp, _Alloc>::const_reference =
const triplet&; KDTree::KDTree<__K, _Val, _Acc, _Dist, _Cmp,
_Alloc>::value_type = triplet]’
test_kdtree.cpp:96:29:   required from here
kdtree.hpp:1323:10: error: ‘_M_construct_node’ was not declared in this
scope, and no declarations were found by argument-dependent lookup at the
point of instantiation [-fpermissive]
kdtree.hpp:1323:10: note: declarations in dependent base
‘KDTree::_Alloc_base<triplet, std::allocator<KDTree::_Node<triplet> > >’
are not found by unqualified lookup
kdtree.hpp:1323:10: note: use ‘this->_M_construct_node’ instead
kdtree.hpp: In instantiation of ‘void KDTree::KDTree<__K, _Val, _Acc,
_Dist, _Cmp, _Alloc>::_M_delete_node(KDTree::KDTree<__K, _Val, _Acc, _Dist,
_Cmp, _Alloc>::_Link_type) [with long unsigned int __K = 3ul; _Val =
triplet; _Acc = std::pointer_to_binary_function<triplet, long unsigned int,
double>; _Dist = KDTree::squared_difference<double, double>; _Cmp =
std::less<double>; _Alloc = std::allocator<KDTree::_Node<triplet> >;
KDTree::KDTree<__K, _Val, _Acc, _Dist, _Cmp, _Alloc>::_Link_type =
KDTree::_Node<triplet>*]’:
kdtree.hpp:388:9:   required from ‘void KDTree::KDTree<__K, _Val, _Acc,
_Dist, _Cmp, _Alloc>::erase(const const_iterator&) [with long unsigned int
__K = 3ul; _Val = triplet; _Acc = std::pointer_to_binary_function<triplet,
long unsigned int, double>; _Dist = KDTree::squared_difference<double,
double>; _Cmp = std::less<double>; _Alloc =
std::allocator<KDTree::_Node<triplet> >; KDTree::KDTree<__K, _Val, _Acc,
_Dist, _Cmp, _Alloc>::const_iterator = KDTree::_Iterator<triplet, const
triplet&, const triplet*>]’
kdtree.hpp:369:9:   required from ‘void KDTree::KDTree<__K, _Val, _Acc,
_Dist, _Cmp, _Alloc>::erase(KDTree::KDTree<__K, _Val, _Acc, _Dist, _Cmp,
_Alloc>::const_reference) [with long unsigned int __K = 3ul; _Val =
triplet; _Acc = std::pointer_to_binary_function<triplet, long unsigned int,
double>; _Dist = KDTree::squared_difference<double, double>; _Cmp =
std::less<double>; _Alloc = std::allocator<KDTree::_Node<triplet> >;
KDTree::KDTree<__K, _Val, _Acc, _Dist, _Cmp, _Alloc>::const_reference =
const triplet&; KDTree::KDTree<__K, _Val, _Acc, _Dist, _Cmp,
_Alloc>::value_type = triplet]’
test_kdtree.cpp:145:15:   required from here
kdtree.hpp:1341:9: error: ‘_M_destroy_node’ was not declared in this scope,
and no declarations were found by argument-dependent lookup at the point of
instantiation [-fpermissive]
kdtree.hpp:1341:9: note: declarations in dependent base
‘KDTree::_Alloc_base<triplet, std::allocator<KDTree::_Node<triplet> > >’
are not found by unqualified lookup
kdtree.hpp:1341:9: note: use ‘this->_M_destroy_node’ instead
kdtree.hpp:1342:9: error: ‘_M_deallocate_node’ was not declared in this
scope, and no declarations were found by argument-dependent lookup at the
point of instantiation [-fpermissive]
kdtree.hpp:1342:9: note: declarations in dependent base
‘KDTree::_Alloc_base<triplet, std::allocator<KDTree::_Node<triplet> > >’
are not found by unqualified lookup
kdtree.hpp:1342:9: note: use ‘this->_M_deallocate_node’ instead
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/libkdtree-devel/attachments/20121030/0edde66d/attachment.html>


More information about the libkdtree-devel mailing list