naxingyu / lstm-rnn

Portal of Johannes and Felix's RNN implementation and further modifications for ASR
GNU General Public License v3.0
21 stars 14 forks source link

Can not compile htk2nc.cpp #2

Open VeliBaba opened 9 years ago

VeliBaba commented 9 years ago

Hi! I tried to compile htk2nc.cpp using 'cc -ohtk2nc htk2nc.cpp -lnetcdf' command. But I had errors:

htk2nc.cpp: In function ‘int main(int, char*_)’: htk2nc.cpp:293:44: error: ‘strcmp’ was not declared in this scope if(strcmp(argv[i], "--mapping_list") == 0) ^ htk2nc.cpp:297:9: error: expected ‘;’ before ‘else’ else if(strcmp(argv[i], "--delimiter") == 0) ^ htk2nc.cpp:312:14: error: no match for ‘operator==’ (operand types are ‘std::string {aka std::basic_string}’ and ‘long int’) if(fnMap == NULL || fnNc == NULL) { ^ htk2nc.cpp:312:14: note: candidates are: In file included from /usr/include/c++/4.8/iosfwd:40:0, from /usr/include/c++/4.8/ios:38, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/postypes.h:216:5: note: template bool std::operator==(const std::fpos<_StateT>&, const std::fpos<_StateT>&) operator==(const fpos<_StateT>& lhs, const fpos<_StateT>& __rhs) ^ /usr/include/c++/4.8/bits/postypes.h:216:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:17: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::fpos<_StateT>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/bits/stl_algobase.h:64:0, from /usr/include/c++/4.8/bits/char_traits.h:39, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/stl_pair.h:214:5: note: template<class _T1, class _T2> bool std::operator==(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&) operator==(const pair<_T1, _T2>& x, const pair<_T1, _T2>& y) ^ /usr/include/c++/4.8/bits/stl_pair.h:214:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:17: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::pair<_T1, _T2>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0, from /usr/include/c++/4.8/bits/char_traits.h:39, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/stl_iterator.h:291:5: note: template bool std::operator==(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&) operator==(const reverse_iterator<_Iterator>& x, ^ /usr/include/c++/4.8/bits/stl_iterator.h:291:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:17: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::reverse_iterator<_Iterator>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0, from /usr/include/c++/4.8/bits/char_traits.h:39, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/stl_iterator.h:341:5: note: template<class _IteratorL, class _IteratorR> bool std::operator==(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&) operator==(const reverse_iterator<_IteratorL>& x, ^ /usr/include/c++/4.8/bits/stl_iterator.h:341:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:17: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::reverse_iterator<_Iterator>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/string:41:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/allocator.h:128:5: note: template<class _T1, class _T2> bool std::operator==(const std::allocator<_CharT>&, const std::allocator<_T2>&) operator==(const allocator<_T1>&, const allocator<_T2>&) ^ /usr/include/c++/4.8/bits/allocator.h:128:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:17: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::allocator<_CharT>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/string:41:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/allocator.h:133:5: note: template bool std::operator==(const std::allocator<_CharT>&, const std::allocator<_CharT>&) operator==(const allocator<_Tp>&, const allocator<_Tp>&) ^ /usr/include/c++/4.8/bits/allocator.h:133:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:17: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::allocator<_CharT>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/string:52:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/basic_string.h:2486:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const std::basic_string<_CharT, _Traits, _Alloc>&, const std::basic_string<_CharT, _Traits, _Alloc>&) operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, ^ /usr/include/c++/4.8/bits/basic_string.h:2486:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:17: note: mismatched types ‘const std::basic_string<_CharT, _Traits, _Alloc>’ and ‘long int’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/string:52:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/basic_string.h:2493:5: note: template typename gnu_cxx::enable_ifstd::is_char<_Tp::value, bool>::type std::operator==(const std::basic_string<_CharT>&, const std::basic_string<_CharT>&) operator==(const basic_string<_CharT>& lhs, ^ /usr/include/c++/4.8/bits/basic_string.h:2493:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:17: note: mismatched types ‘const std::basic_string<_CharT>’ and ‘long int’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/string:52:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/basic_string.h:2507:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const CharT, const std::basic_string<_CharT, _Traits, _Alloc>&) operator==(const _CharT* lhs, ^ /usr/include/c++/4.8/bits/basic_string.h:2507:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:17: note: mismatched types ‘const CharT’ and ‘std::basic_string’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/string:52:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/basic_string.h:2519:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const std::basic_string<_CharT, _Traits, _Alloc>&, const CharT) operator==(const basic_string<_CharT, _Traits, _Alloc>& lhs, ^ /usr/include/c++/4.8/bits/basic_string.h:2519:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:17: note: mismatched types ‘const CharT’ and ‘long int’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/bits/locale_facets.h:48:0, from /usr/include/c++/4.8/bits/basic_ios.h:37, from /usr/include/c++/4.8/ios:44, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/streambuf_iterator.h:204:5: note: template<class _CharT, class _Traits> bool std::operator==(const std::istreambuf_iterator<_CharT, _Traits>&, const std::istreambuf_iterator<_CharT, _Traits>&) operator==(const istreambuf_iterator<_CharT, _Traits>& a, ^ /usr/include/c++/4.8/bits/streambuf_iterator.h:204:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:17: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::istreambuf_iterator<_CharT, _Traits>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/vector:64:0, from htk2nc.cpp:4: /usr/include/c++/4.8/bits/stl_vector.h:1404:5: note: template<class _Tp, class _Alloc> bool std::operator==(const std::vector<_Tp, _Alloc>&, const std::vector<_Tp, _Alloc>&) operator==(const vector<_Tp, _Alloc>& x, const vector<_Tp, _Alloc>& y) ^ /usr/include/c++/4.8/bits/stl_vector.h:1404:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:17: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::vector<_Tp, _Alloc>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/map:60:0, from htk2nc.cpp:5: /usr/include/c++/4.8/bits/stl_tree.h:310:5: note: template bool std::operator==(const std::_Rb_tree_iterator<_Tp>&, const std::_Rb_tree_const_iterator<_Val>&) operator==(const _Rb_tree_iterator<_Val>& x, ^ /usr/include/c++/4.8/bits/stl_tree.h:310:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:17: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::_Rb_tree_iterator<_Tp>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/map:60:0, from htk2nc.cpp:5: /usr/include/c++/4.8/bits/stl_tree.h:907:5: note: template<class _Key, class _Val, class _KeyOfValue, class _Compare, class _Alloc> bool std::operator==(const std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&, const std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&) operator==(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& x, ^ /usr/include/c++/4.8/bits/stl_tree.h:907:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:17: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/map:61:0, from htk2nc.cpp:5: /usr/include/c++/4.8/bits/stl_map.h:962:5: note: template<class _Key, class _Tp, class _Compare, class _Alloc> bool std::operator==(const std::map<_Key, _Tp, _Compare, _Alloc>&, const std::map<_Key, _Tp, _Compare, _Alloc>&) operator==(const map<_Key, _Tp, _Compare, _Alloc>& x, ^ /usr/include/c++/4.8/bits/stl_map.h:962:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:17: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::map<_Key, _Tp, _Compare, _Alloc>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/map:62:0, from htk2nc.cpp:5: /usr/include/c++/4.8/bits/stl_multimap.h:864:5: note: template<class _Key, class _Tp, class _Compare, class _Alloc> bool std::operator==(const std::multimap<_Key, _Tp, _Compare, _Alloc>&, const std::multimap<_Key, _Tp, _Compare, _Alloc>&) operator==(const multimap<_Key, _Tp, _Compare, _Alloc>& x, ^ /usr/include/c++/4.8/bits/stl_multimap.h:864:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:17: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::multimap<_Key, _Tp, _Compare, _Alloc>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/x86_64-linux-gnu/c++/4.8/bits/c++allocator.h:33:0, from /usr/include/c++/4.8/bits/allocator.h:46, from /usr/include/c++/4.8/string:41, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/ext/new_allocator.h:139:5: note: template bool gnu_cxx::operator==(const __gnu_cxx::new_allocator<_Tp>&, const gnu_cxx::new_allocator<_Tp>&) operator==(const new_allocator<_Tp>&, const new_allocator<_Tp>&) ^ /usr/include/c++/4.8/ext/new_allocator.h:139:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:17: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const gnu_cxx::new_allocator<_Tp>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0, from /usr/include/c++/4.8/bits/char_traits.h:39, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/stl_iterator.h:811:5: note: template<class _Iterator, class _Container> bool gnu_cxx::operator==(const gnu_cxx::__normal_iterator<_Iterator, _Container>&, const gnu_cxx::normal_iterator<_Iterator, _Container>&) operator==(const __normal_iterator<_Iterator, _Container>& lhs, ^ /usr/include/c++/4.8/bits/stl_iterator.h:811:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:17: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const gnu_cxx::__normal_iterator<_Iterator, _Container>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0, from /usr/include/c++/4.8/bits/char_traits.h:39, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/stl_iterator.h:805:5: note: template<class _IteratorL, class _IteratorR, class _Container> bool gnu_cxx::operator==(const gnu_cxx::__normal_iterator<_IteratorL, _Container>&, const gnu_cxx::normal_iterator<_IteratorR, _Container>&) operator==(const __normal_iterator<_IteratorL, _Container>& lhs, ^ /usr/include/c++/4.8/bits/stl_iterator.h:805:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:17: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const gnu_cxx::normal_iterator<_IteratorL, _Container>’ if(fnMap == NULL || fnNc == NULL) { ^ htk2nc.cpp:312:30: error: no match for ‘operator==’ (operand types are ‘std::string {aka std::basic_string}’ and ‘long int’) if(fnMap == NULL || fnNc == NULL) { ^ htk2nc.cpp:312:30: note: candidates are: In file included from /usr/include/c++/4.8/iosfwd:40:0, from /usr/include/c++/4.8/ios:38, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/postypes.h:216:5: note: template bool std::operator==(const std::fpos<_StateT>&, const std::fpos<_StateT>&) operator==(const fpos<_StateT>& lhs, const fpos<_StateT>& rhs) ^ /usr/include/c++/4.8/bits/postypes.h:216:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:33: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::fpos<_StateT>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/bits/stl_algobase.h:64:0, from /usr/include/c++/4.8/bits/char_traits.h:39, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/stl_pair.h:214:5: note: template<class _T1, class _T2> bool std::operator==(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&) operator==(const pair<_T1, _T2>& x, const pair<_T1, _T2>& y) ^ /usr/include/c++/4.8/bits/stl_pair.h:214:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:33: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::pair<_T1, _T2>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0, from /usr/include/c++/4.8/bits/char_traits.h:39, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/stl_iterator.h:291:5: note: template bool std::operator==(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&) operator==(const reverse_iterator<_Iterator>& x, ^ /usr/include/c++/4.8/bits/stl_iterator.h:291:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:33: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::reverse_iterator<_Iterator>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0, from /usr/include/c++/4.8/bits/char_traits.h:39, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/stl_iterator.h:341:5: note: template<class _IteratorL, class _IteratorR> bool std::operator==(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&) operator==(const reverse_iterator<_IteratorL>& __x, ^ /usr/include/c++/4.8/bits/stl_iterator.h:341:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:33: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::reverse_iterator<_Iterator>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/string:41:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/allocator.h:128:5: note: template<class _T1, class _T2> bool std::operator==(const std::allocator<_CharT>&, const std::allocator<_T2>&) operator==(const allocator<_T1>&, const allocator<_T2>&) ^ /usr/include/c++/4.8/bits/allocator.h:128:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:33: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::allocator<_CharT>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/string:41:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/allocator.h:133:5: note: template bool std::operator==(const std::allocator<_CharT>&, const std::allocator<_CharT>&) operator==(const allocator<_Tp>&, const allocator<_Tp>&) ^ /usr/include/c++/4.8/bits/allocator.h:133:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:33: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::allocator<_CharT>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/string:52:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/basic_string.h:2486:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const std::basic_string<_CharT, _Traits, _Alloc>&, const std::basic_string<_CharT, _Traits, _Alloc>&) operator==(const basic_string<_CharT, _Traits, _Alloc>& lhs, ^ /usr/include/c++/4.8/bits/basic_string.h:2486:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:33: note: mismatched types ‘const std::basic_string<_CharT, _Traits, _Alloc>’ and ‘long int’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/string:52:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/basic_string.h:2493:5: note: template typename gnu_cxx::__enable_ifstd::is_char<_Tp::value, bool>::type std::operator==(const std::basic_string<_CharT>&, const std::basic_string<_CharT>&) operator==(const basic_string<_CharT>& lhs, ^ /usr/include/c++/4.8/bits/basic_string.h:2493:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:33: note: mismatched types ‘const std::basic_string<_CharT>’ and ‘long int’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/string:52:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/basic_string.h:2507:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const CharT, const std::basic_string<_CharT, _Traits, _Alloc>&) operator==(const _CharT* lhs, ^ /usr/include/c++/4.8/bits/basic_string.h:2507:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:33: note: mismatched types ‘const CharT’ and ‘std::basic_string’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/string:52:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/basic_string.h:2519:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const std::basic_string<_CharT, _Traits, _Alloc>&, const CharT) operator==(const basic_string<_CharT, _Traits, _Alloc>& lhs, ^ /usr/include/c++/4.8/bits/basic_string.h:2519:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:33: note: mismatched types ‘const _CharT*’ and ‘long int’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/bits/locale_facets.h:48:0, from /usr/include/c++/4.8/bits/basic_ios.h:37, from /usr/include/c++/4.8/ios:44, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/streambuf_iterator.h:204:5: note: template<class _CharT, class _Traits> bool std::operator==(const std::istreambuf_iterator<_CharT, _Traits>&, const std::istreambuf_iterator<_CharT, _Traits>&) operator==(const istreambuf_iterator<_CharT, _Traits>& a, ^ /usr/include/c++/4.8/bits/streambuf_iterator.h:204:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:33: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::istreambuf_iterator<_CharT, _Traits>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/vector:64:0, from htk2nc.cpp:4: /usr/include/c++/4.8/bits/stl_vector.h:1404:5: note: template<class _Tp, class _Alloc> bool std::operator==(const std::vector<_Tp, _Alloc>&, const std::vector<_Tp, _Alloc>&) operator==(const vector<_Tp, _Alloc>& x, const vector<_Tp, _Alloc>& y) ^ /usr/include/c++/4.8/bits/stl_vector.h:1404:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:33: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::vector<_Tp, _Alloc>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/map:60:0, from htk2nc.cpp:5: /usr/include/c++/4.8/bits/stl_tree.h:310:5: note: template bool std::operator==(const std::_Rb_tree_iterator<_Tp>&, const std::_Rb_tree_const_iterator<_Val>&) operator==(const _Rb_tree_iterator<_Val>& x, ^ /usr/include/c++/4.8/bits/stl_tree.h:310:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:33: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::_Rb_tree_iterator<_Tp>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/map:60:0, from htk2nc.cpp:5: /usr/include/c++/4.8/bits/stl_tree.h:907:5: note: template<class _Key, class _Val, class _KeyOfValue, class _Compare, class _Alloc> bool std::operator==(const std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&, const std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&) operator==(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& x, ^ /usr/include/c++/4.8/bits/stl_tree.h:907:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:33: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/map:61:0, from htk2nc.cpp:5: /usr/include/c++/4.8/bits/stl_map.h:962:5: note: template<class _Key, class _Tp, class _Compare, class _Alloc> bool std::operator==(const std::map<_Key, _Tp, _Compare, _Alloc>&, const std::map<_Key, _Tp, _Compare, _Alloc>&) operator==(const map<_Key, _Tp, _Compare, _Alloc>& x, ^ /usr/include/c++/4.8/bits/stl_map.h:962:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:33: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::map<_Key, _Tp, _Compare, _Alloc>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/map:62:0, from htk2nc.cpp:5: /usr/include/c++/4.8/bits/stl_multimap.h:864:5: note: template<class _Key, class _Tp, class _Compare, class _Alloc> bool std::operator==(const std::multimap<_Key, _Tp, _Compare, _Alloc>&, const std::multimap<_Key, _Tp, _Compare, _Alloc>&) operator==(const multimap<_Key, _Tp, _Compare, _Alloc>& x, ^ /usr/include/c++/4.8/bits/stl_multimap.h:864:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:33: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::multimap<_Key, _Tp, _Compare, _Alloc>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/x86_64-linux-gnu/c++/4.8/bits/c++allocator.h:33:0, from /usr/include/c++/4.8/bits/allocator.h:46, from /usr/include/c++/4.8/string:41, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/ext/new_allocator.h:139:5: note: template bool gnu_cxx::operator==(const __gnu_cxx::new_allocator<_Tp>&, const gnu_cxx::new_allocator<_Tp>&) operator==(const new_allocator<_Tp>&, const new_allocator<_Tp>&) ^ /usr/include/c++/4.8/ext/new_allocator.h:139:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:33: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const gnu_cxx::new_allocator<_Tp>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0, from /usr/include/c++/4.8/bits/char_traits.h:39, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/stl_iterator.h:811:5: note: template<class _Iterator, class _Container> bool gnu_cxx::operator==(const gnu_cxx::__normal_iterator<_Iterator, _Container>&, const gnu_cxx::normal_iterator<_Iterator, _Container>&) operator==(const __normal_iterator<_Iterator, _Container>& lhs, ^ /usr/include/c++/4.8/bits/stl_iterator.h:811:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:33: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const gnu_cxx::__normal_iterator<_Iterator, _Container>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0, from /usr/include/c++/4.8/bits/char_traits.h:39, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/stl_iterator.h:805:5: note: template<class _IteratorL, class _IteratorR, class _Container> bool gnu_cxx::operator==(const gnu_cxx::__normal_iterator<_IteratorL, _Container>&, const gnu_cxx::normal_iterator<_IteratorR, _Container>&) operator==(const __normal_iterator<_IteratorL, _Container>& lhs, ^ /usr/include/c++/4.8/bits/stl_iterator.h:805:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:33: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const __gnu_cxx::__normal_iterator<_IteratorL, _Container>’ if(fnMap == NULL || fnNc == NULL) { ^ htk2nc.cpp:556:5: error: expected ‘;’ before ‘int’ int ret; ^ htk2nc.cpp:559:10: error: ‘ret’ was not declared in this scope if ((ret = nc_create(fnNc.c_str(), NC_NETCDF4, &ncid)) != NC_NOERR) { ^ htk2nc.cpp:565:10: error: ‘ret’ was not declared in this scope if ((ret = nc_def_dim(ncid, "numSeqs", nNewSeq, &nseq_dimid)) != NC_NOERR) { ^ htk2nc.cpp:570:10: error: ‘ret’ was not declared in this scope if ((ret = nc_def_dim(ncid, "numTimesteps", totalTimesteps, &nt_dimid)) != NC_NOERR) { ^ htk2nc.cpp:575:10: error: ‘ret’ was not declared in this scope if ((ret = nc_def_dim(ncid, "inputPattSize", input_size, &input_size_dimid)) != NC_NOERR) { ^ htk2nc.cpp:582:14: error: ‘ret’ was not declared in this scope if ((ret = nc_def_dim(ncid, "numLabels", numLabels, &num_labels_dimid)) != NC_NOERR) { ^ htk2nc.cpp:588:14: error: ‘ret’ was not declared in this scope if ((ret = nc_def_dim(ncid, "targetPattSize", output_size, &output_size_dimid)) != NC_NOERR) { ^ htk2nc.cpp:594:10: error: ‘ret’ was not declared in this scope if ((ret = nc_def_dim(ncid, "maxSeqTagLength", max_fn_len, &mstl_dimid)) != NC_NOERR) { ^ htk2nc.cpp:601:14: error: ‘ret’ was not declared in this scope if ((ret = nc_def_dim(ncid, "maxLabelLength", maxLabelLength, &mll_dimid)) != NC_NOERR) { ^ htk2nc.cpp:613:14: error: ‘ret’ was not declared in this scope if ((ret = nc_def_var(ncid, "labels", NC_CHAR, 2, class_list_dimids, &class_list_varid)) != NC_NOERR) { ^ htk2nc.cpp:622:10: error: ‘ret’ was not declared in this scope if ((ret = nc_def_var(ncid, "seqTags", NC_CHAR, 2, seqTags_dimids, &seqTags_varid)) != NC_NOERR) { ^ htk2nc.cpp:630:10: error: ‘ret’ was not declared in this scope if ((ret = nc_def_var(ncid, "seqLengths", NC_INT, 1, seqLengths_dimids, &seqLengths_varid)) != NC_NOERR) { ^ htk2nc.cpp:638:10: error: ‘ret’ was not declared in this scope if ((ret = nc_def_var(ncid, "inputs", NC_FLOAT, 2, input_dimids, &inputs_varid)) != NC_NOERR) { ^ htk2nc.cpp:648:14: error: ‘ret’ was not declared in this scope if ((ret = nc_def_var(ncid, "targetClasses", NC_INT, 1, labels_dimids, &labels_varid)) != NC_NOERR) { ^ htk2nc.cpp:656:14: error: ‘ret’ was not declared in this scope if ((ret = nc_def_var(ncid, "targetPatterns", NC_FLOAT, 2, output_dimids, &outputs_varid)) != NC_NOERR) { ^ htk2nc.cpp:663:10: error: ‘ret’ was not declared in this scope if ((ret = nc_enddef(ncid)) != NC_NOERR) { ^ htk2nc.cpp:674:18: error: ‘ret’ was not declared in this scope if ((ret = nc_put_vara_text(ncid, class_list_varid, start, count, labels[0][l].c_str())) != NC_NOERR) { ^ htk2nc.cpp:685:14: error: ‘ret’ was not declared in this scope if ((ret = nc_put_vara_text(ncid, seqTags_varid, start, count, seqTags[s].c_str())) != NC_NOERR) { ^ htk2nc.cpp:692:10: error: ‘ret’ was not declared in this scope if ((ret = nc_put_var_int(ncid, seqLengths_varid, seqLenArr)) != NC_NOERR) { ^ htk2nc.cpp:718:13: error: ‘ret’ was not declared in this scope ret = readHtk(mapping[s][f].c_str(), &h); ^ htk2nc.cpp:732:14: error: ‘ret’ was not declared in this scope if ((ret = nc_put_vara_float(ncid, inputs_varid, start, count, inp_buf)) != NC_NOERR) { ^ htk2nc.cpp:747:17: error: ‘ret’ was not declared in this scope ret = read_label_file(mapping[s][nInputs].c_str(), labelMap[0], label_buf, seqLens[s]); ^ htk2nc.cpp:749:17: error: ‘ret’ was not declared in this scope ret = read_label_file(mapping[s][nInputs].c_str(), label_buf, seqLens[s], nClasses); ^ htk2nc.cpp:750:17: error: ‘ret’ was not declared in this scope if (ret != 0) { ^ htk2nc.cpp:756:18: error: ‘ret’ was not declared in this scope if ((ret = nc_put_vara_int(ncid, labels_varid, start_l, count_l, label_buf)) != NC_NOERR) { ^ htk2nc.cpp:767:17: error: ‘ret’ was not declared in this scope ret = readHtk(mapping[s][f].c_str(), &h); ^ htk2nc.cpp:780:18: error: ‘ret’ was not declared in this scope if ((ret = nc_put_vara_float(ncid, outputs_varid, start, count, outp_buf)) != NC_NOERR) { ^

What should I do?

sthenc commented 9 years ago

Hi, well try to resolve the first error the compiler gives you.

It seems that you are missing a header file.

Either that or you are using C compiler instead of a C++ compiler you need in this case.

Good luck

On Mon, Oct 26, 2015 at 2:37 PM, VeliBaba notifications@github.com wrote:

Hi! I tried to compile htk2nc.cpp using 'cc -ohtk2nc htk2nc.cpp -lnetcdf' command. But I had errors:

htk2nc.cpp: In function ‘int main(int, char*

_)’: htk2nc.cpp:293:44: error: ‘strcmp’ was not declared in this scope if(strcmp(argv[i], "--mapping_list") == 0) ^ htk2nc.cpp:297:9: error: expected ‘;’ before ‘else’ else if(strcmp(argv[i], "--delimiter") == 0) ^ htk2nc.cpp:312:14: error: no match for ‘operator==’ (operand types are ‘std::string {aka std::basic_string}’ and ‘long int’) if(fnMap == NULL || fnNc == NULL) { ^ htk2nc.cpp:312:14: note: candidates are: In file included from /usr/include/c++/4.8/iosfwd:40:0, from /usr/include/c++/4.8/ios:38, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/postypes.h:216:5: note: template bool std::operator==(const std::fpos<_StateT>&, const std::fpos<_StateT>&) operator==(const fpos<_StateT>& lhs, const fpos<_StateT>& __rhs) ^ /usr/include/c++/4.8/bits/postypes.h:216:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:17: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::fpos<_StateT>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/bits/stl_algobase.h:64:0, from /usr/include/c++/4.8/bits/char_traits.h:39, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/stl_pair.h:214:5: note: template bool std::operator==(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&) operator==(const pair<_T1, _T2>& x, const pair<_T1, _T2>& y) ^ /usr/include/c++/4.8/bits/stl_pair.h:214:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:17: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::pair<_T1, _T2>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0, from /usr/include/c++/4.8/bits/char_traits.h:39, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/stl_iterator.h:291:5: note: template bool std::operator==(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&) operator==(const reverse_iterator<_Iterator>& __x, ^ /usr/include/c++/4.8/bits/stl_iterator.h:291:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:17: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::reverse_iterator<_Iterator>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0, from /usr/include/c++/4.8/bits/char_traits.h:39, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/stl_iterator.h:341:5: note: template bool std::operator==(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&) operator==(const reverse_iterator<_IteratorL>& x, ^ /usr/include/c++/4.8/bits/stl_iterator.h:341:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:17: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::reverse_iterator<_Iterator>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/string:41:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/allocator.h:128:5: note: template bool std::operator==(const std::allocator<_CharT>&, const std::allocator<_T2>&) operator==(const allocator<_T1>&, const allocator<_T2>&) ^ /usr/include/c++/4.8/bits/allocator.h:128:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:17: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::allocator<_CharT>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/string:41:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/allocator.h:133:5: note: template bool std::operator==(const std::allocator<_CharT>&, const std::allocator<_CharT>&) operator==(const allocator<_Tp>&, const allocator<_Tp>&) ^ /usr/include/c++/4.8/bits/allocator.h:133:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:17: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::allocator<_CharT>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/string:52:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/basic_string.h:2486:5: note: template bool std::operator==(const std::basic_string<_CharT, _Traits, _Alloc>&, const std::basic_string<_CharT, _Traits, _Alloc>&) operator==(const basic_string<_CharT, _Traits, _Alloc>& lhs, ^ /usr/include/c++/4.8/bits/basic_string.h:2486:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:17: note: mismatched types ‘const std::basic_string<_CharT, _Traits, _Alloc>’ and ‘long int’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/string:52:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/basic_string.h:2493:5: note: template typename gnu_cxx::enable_ifstd::is_char<_Tp::value, bool>::type std::operator==(const std::basic_string<_CharT>&, const std::basic_string<_CharT>&) operator==(const basic_string<_CharT>& lhs, ^ /usr/include/c++/4.8/bits/basic_string.h:2493:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:17: note: mismatched types ‘const std::basic_string<_CharT>’ and ‘long int’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/string:52:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/basic_string.h:2507:5: note: template bool std::operator==(const CharT, const std::basic_string<_CharT, _Traits, _Alloc>&) operator==(const _CharT* lhs, ^ /usr/include/c++/4.8/bits/basic_string.h:2507:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:17: note: mismatched types ‘const _CharT

_’ and ‘std::basic_string’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/string:52:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/basic_string.h:2519:5: note: template bool std::operator==(const std::basic_string<_CharT, _Traits, _Alloc>&, const CharT) operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, ^ /usr/include/c++/4.8/bits/basic_string.h:2519:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:17: note: mismatched types ‘const _CharT

_’ and ‘long int’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/bits/locale_facets.h:48:0, from /usr/include/c++/4.8/bits/basic_ios.h:37, from /usr/include/c++/4.8/ios:44, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/streambuf_iterator.h:204:5: note: template bool std::operator==(const std::istreambuf_iterator<_CharT, _Traits>&, const std::istreambuf_iterator<_CharT, _Traits>&) operator==(const istreambuf_iterator<_CharT, _Traits>& a, ^ /usr/include/c++/4.8/bits/streambuf_iterator.h:204:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:17: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::istreambuf_iterator<_CharT, _Traits>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/vector:64:0, from htk2nc.cpp:4: /usr/include/c++/4.8/bits/stl_vector.h:1404:5: note: template bool std::operator==(const std::vector<_Tp, _Alloc>&, const std::vector<_Tp, _Alloc>&) operator==(const vector<_Tp, _Alloc>& x, const vector<_Tp, _Alloc>& y) ^ /usr/include/c++/4.8/bits/stl_vector.h:1404:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:17: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::vector<_Tp, _Alloc>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/map:60:0, from htk2nc.cpp:5: /usr/include/c++/4.8/bits/stl_tree.h:310:5: note: template bool std::operator==(const std::_Rb_tree_iterator<_Tp>&, const std::_Rb_tree_const_iterator<_Val>&) operator==(const _Rb_tree_iterator<_Val>& x, ^ /usr/include/c++/4.8/bits/stl_tree.h:310:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:17: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::_Rb_tree_iterator<_Tp>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/map:60:0, from htk2nc.cpp:5: /usr/include/c++/4.8/bits/stl_tree.h:907:5: note: template bool std::operator==(const std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&, const std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&) operator==(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& x, ^ /usr/include/c++/4.8/bits/stl_tree.h:907:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:17: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/map:61:0, from htk2nc.cpp:5: /usr/include/c++/4.8/bits/stl_map.h:962:5: note: template bool std::operator==(const std::map<_Key, _Tp, _Compare, _Alloc>&, const std::map<_Key, _Tp, _Compare, _Alloc>&) operator==(const map<_Key, _Tp, _Compare, _Alloc>& x, ^ /usr/include/c++/4.8/bits/stl_map.h:962:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:17: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::map<_Key, _Tp, _Compare, _Alloc>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/map:62:0, from htk2nc.cpp:5: /usr/include/c++/4.8/bits/stl_multimap.h:864:5: note: template bool std::operator==(const std::multimap<_Key, _Tp, _Compare, _Alloc>&, const std::multimap<_Key, _Tp, _Compare, _Alloc>&) operator==(const multimap<_Key, _Tp, _Compare, _Alloc>& x, ^ /usr/include/c++/4.8/bits/stl_multimap.h:864:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:17: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::multimap<_Key, _Tp, _Compare, _Alloc>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/x86_64-linux-gnu/c++/4.8/bits/c++allocator.h:33:0, from /usr/include/c++/4.8/bits/allocator.h:46, from /usr/include/c++/4.8/string:41, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/ext/new_allocator.h:139:5: note: template bool gnu_cxx::operator==(const gnu_cxx::new_allocator<_Tp>&, const __gnu_cxx::new_allocator<_Tp>&) operator==(const new_allocator<_Tp>&, const new_allocator<_Tp>&) ^ /usr/include/c++/4.8/ext/new_allocator.h:139:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:17: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const gnu_cxx::new_allocator<_Tp>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0, from /usr/include/c++/4.8/bits/char_traits.h:39, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/stl_iterator.h:811:5: note: template bool gnu_cxx::operator==(const __gnu_cxx::normal_iterator<_Iterator, _Container>&, const gnu_cxx::__normal_iterator<_Iterator, _Container>&) operator==(const normal_iterator<_Iterator, _Container>& lhs, ^ /usr/include/c++/4.8/bits/stl_iterator.h:811:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:17: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const gnu_cxx::normal_iterator<_Iterator, _Container>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0, from /usr/include/c++/4.8/bits/char_traits.h:39, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/stl_iterator.h:805:5: note: template bool gnu_cxx::operator==(const gnu_cxx::__normal_iterator<_IteratorL, _Container>&, const gnu_cxx::normal_iterator<_IteratorR, _Container>&) operator==(const __normal_iterator<_IteratorL, _Container>& lhs, ^ /usr/include/c++/4.8/bits/stl_iterator.h:805:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:17: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const gnu_cxx::__normal_iterator<_IteratorL, _Container>’ if(fnMap == NULL || fnNc == NULL) { ^ htk2nc.cpp:312:30: error: no match for ‘operator==’ (operand types are ‘std::string {aka std::basic_string}’ and ‘long int’) if(fnMap == NULL || fnNc == NULL) { ^ htk2nc.cpp:312:30: note: candidates are: In file included from /usr/include/c++/4.8/iosfwd:40:0, from /usr/include/c++/4.8/ios:38, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/postypes.h:216:5: note: template bool std::operator==(const std::fpos<_StateT>&, const std::fpos<_StateT>&) operator==(const fpos<_StateT>& lhs, const fpos<_StateT>& rhs) ^ /usr/include/c++/4.8/bits/postypes.h:216:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:33: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::fpos<_StateT>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/bits/stl_algobase.h:64:0, from /usr/include/c++/4.8/bits/char_traits.h:39, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/stl_pair.h:214:5: note: template bool std::operator==(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&) operator==(const pair<_T1, _T2>& x, const pair<_T1, _T2>& y) ^ /usr/include/c++/4.8/bits/stl_pair.h:214:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:33: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::pair<_T1, _T2>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0, from /usr/include/c++/4.8/bits/char_traits.h:39, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/stl_iterator.h:291:5: note: template bool std::operator==(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&) operator==(const reverse_iterator<_Iterator>& x, ^ /usr/include/c++/4.8/bits/stl_iterator.h:291:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:33: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::reverse_iterator<_Iterator>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0, from /usr/include/c++/4.8/bits/char_traits.h:39, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/stl_iterator.h:341:5: note: template bool std::operator==(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&) operator==(const reverse_iterator<_IteratorL>& x, ^ /usr/include/c++/4.8/bits/stl_iterator.h:341:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:33: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::reverse_iterator<_Iterator>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/string:41:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/allocator.h:128:5: note: template bool std::operator==(const std::allocator<_CharT>&, const std::allocator<_T2>&) operator==(const allocator<_T1>&, const allocator<_T2>&) ^ /usr/include/c++/4.8/bits/allocator.h:128:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:33: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::allocator<_CharT>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/string:41:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/allocator.h:133:5: note: template bool std::operator==(const std::allocator<_CharT>&, const std::allocator<_CharT>&) operator==(const allocator<_Tp>&, const allocator<_Tp>&) ^ /usr/include/c++/4.8/bits/allocator.h:133:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:33: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::allocator<_CharT>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/string:52:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/basic_string.h:2486:5: note: template bool std::operator==(const std::basic_string<_CharT, _Traits, _Alloc>&, const std::basic_string<_CharT, _Traits, _Alloc>&) operator==(const basic_string<_CharT, _Traits, _Alloc>& lhs, ^ /usr/include/c++/4.8/bits/basic_string.h:2486:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:33: note: mismatched types ‘const std::basic_string<_CharT, _Traits, _Alloc>’ and ‘long int’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/string:52:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/basic_string.h:2493:5: note: template typename gnu_cxx::enable_ifstd::is_char<_Tp::value, bool>::type std::operator==(const std::basic_string<_CharT>&, const std::basic_string<_CharT>&) operator==(const basic_string<_CharT>& lhs, ^ /usr/include/c++/4.8/bits/basic_string.h:2493:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:33: note: mismatched types ‘const std::basic_string<_CharT>’ and ‘long int’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/string:52:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/basic_string.h:2507:5: note: template bool std::operator==(const CharT, const std::basic_string<_CharT, _Traits, _Alloc>&) operator==(const _CharT* __lhs, ^ /usr/include/c++/4.8/bits/basic_string.h:2507:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:33: note: mismatched types ‘const _CharT

_’ and ‘std::basic_string’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/string:52:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/basic_string.h:2519:5: note: template bool std::operator==(const std::basic_string<_CharT, _Traits, _Alloc>&, const CharT) operator==(const basic_string<_CharT, _Traits, _Alloc>& lhs, ^ /usr/include/c++/4.8/bits/basic_string.h:2519:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:33: note: mismatched types ‘const _CharT*’ and ‘long int’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/bits/locale_facets.h:48:0, from /usr/include/c++/4.8/bits/basic_ios.h:37, from /usr/include/c++/4.8/ios:44, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/streambuf_iterator.h:204:5: note: template bool std::operator==(const std::istreambuf_iterator<_CharT, _Traits>&, const std::istreambuf_iterator<_CharT, _Traits>&) operator==(const istreambuf_iterator<_CharT, _Traits>& a, ^ /usr/include/c++/4.8/bits/streambuf_iterator.h:204:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:33: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::istreambuf_iterator<_CharT, _Traits>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/vector:64:0, from htk2nc.cpp:4: /usr/include/c++/4.8/bits/stl_vector.h:1404:5: note: template bool std::operator==(const std::vector<_Tp, _Alloc>&, const std::vector<_Tp, _Alloc>&) operator==(const vector<_Tp, _Alloc>& x, const vector<_Tp, _Alloc>& y) ^ /usr/include/c++/4.8/bits/stl_vector.h:1404:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:33: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::vector<_Tp, _Alloc>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/map:60:0, from htk2nc.cpp:5: /usr/include/c++/4.8/bits/stl_tree.h:310:5: note: template bool std::operator==(const std::_Rb_tree_iterator<_Tp>&, const std::_Rb_tree_const_iterator<_Val>&) operator==(const _Rb_tree_iterator<_Val>& x, ^ /usr/include/c++/4.8/bits/stl_tree.h:310:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:33: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::_Rb_tree_iterator<_Tp>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/map:60:0, from htk2nc.cpp:5: /usr/include/c++/4.8/bits/stl_tree.h:907:5: note: template bool std::operator==(const std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&, const std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&) operator==(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& x, ^ /usr/include/c++/4.8/bits/stl_tree.h:907:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:33: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/map:61:0, from htk2nc.cpp:5: /usr/include/c++/4.8/bits/stl_map.h:962:5: note: template bool std::operator==(const std::map<_Key, _Tp, _Compare, _Alloc>&, const std::map<_Key, _Tp, _Compare, _Alloc>&) operator==(const map<_Key, _Tp, _Compare, _Alloc>& x, ^ /usr/include/c++/4.8/bits/stl_map.h:962:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:33: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::map<_Key, _Tp, _Compare, _Alloc>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/map:62:0, from htk2nc.cpp:5: /usr/include/c++/4.8/bits/stl_multimap.h:864:5: note: template bool std::operator==(const std::multimap<_Key, _Tp, _Compare, _Alloc>&, const std::multimap<_Key, _Tp, _Compare, _Alloc>&) operator==(const multimap<_Key, _Tp, _Compare, _Alloc>& x, ^ /usr/include/c++/4.8/bits/stl_multimap.h:864:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:33: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const std::multimap<_Key, _Tp, _Compare, _Alloc>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/x86_64-linux-gnu/c++/4.8/bits/c++allocator.h:33:0, from /usr/include/c++/4.8/bits/allocator.h:46, from /usr/include/c++/4.8/string:41, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/ext/new_allocator.h:139:5: note: template bool gnu_cxx::operator==(const gnu_cxx::new_allocator<_Tp>&, const gnu_cxx::new_allocator<_Tp>&) operator==(const new_allocator<_Tp>&, const new_allocator<_Tp>&) ^ /usr/include/c++/4.8/ext/new_allocator.h:139:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:33: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const gnu_cxx::new_allocator<_Tp>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0, from /usr/include/c++/4.8/bits/char_traits.h:39, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/stl_iterator.h:811:5: note: template bool gnu_cxx::operator==(const gnu_cxx::normal_iterator<_Iterator, _Container>&, const __gnu_cxx::normal_iterator<_Iterator, _Container>&) operator==(const normal_iterator<_Iterator, _Container>& lhs, ^ /usr/include/c++/4.8/bits/stl_iterator.h:811:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:33: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const gnu_cxx::normal_iterator<_Iterator, _Container>’ if(fnMap == NULL || fnNc == NULL) { ^ In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0, from /usr/include/c++/4.8/bits/char_traits.h:39, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from htk2nc.cpp:1: /usr/include/c++/4.8/bits/stl_iterator.h:805:5: note: template bool gnu_cxx::operator==(const __gnu_cxx::normal_iterator<_IteratorL, _Container>&, const gnu_cxx::__normal_iterator<_IteratorR, _Container>&) operator==(const normal_iterator<_IteratorL, _Container>& lhs, ^ /usr/include/c++/4.8/bits/stl_iterator.h:805:5: note: template argument deduction/substitution failed: In file included from /usr/include/netcdf.h:38:0, from htk2nc.cpp:11: htk2nc.cpp:312:33: note: ‘std::string {aka std::basic_string}’ is not derived from ‘const gnu_cxx::__normal_iterator<_IteratorL, _Container>’ if(fnMap == NULL || fnNc == NULL) { ^ htk2nc.cpp:556:5: error: expected ‘;’ before ‘int’ int ret; ^ htk2nc.cpp:559:10: error: ‘ret’ was not declared in this scope if ((ret = nc_create(fnNc.c_str(), NC_NETCDF4, &ncid)) != NC_NOERR) { ^ htk2nc.cpp:565:10: error: ‘ret’ was not declared in this scope if ((ret = nc_def_dim(ncid, "numSeqs", nNewSeq, &nseq_dimid)) != NC_NOERR) { ^ htk2nc.cpp:570:10: error: ‘ret’ was not declared in this scope if ((ret = nc_def_dim(ncid, "numTimesteps", totalTimesteps, &nt_dimid)) != NC_NOERR) { ^ htk2nc.cpp:575:10: error: ‘ret’ was not declared in this scope if ((ret = nc_def_dim(ncid, "inputPattSize", input_size, &input_size_dimid)) != NC_NOERR) { ^ htk2nc.cpp:582:14: error: ‘ret’ was not declared in this scope if ((ret = nc_def_dim(ncid, "numLabels", numLabels, &num_labels_dimid)) != NC_NOERR) { ^ htk2nc.cpp:588:14: error: ‘ret’ was not declared in this scope if ((ret = nc_def_dim(ncid, "targetPattSize", output_size, &output_size_dimid)) != NC_NOERR) { ^ htk2nc.cpp:594:10: error: ‘ret’ was not declared in this scope if ((ret = nc_def_dim(ncid, "maxSeqTagLength", max_fn_len, &mstl_dimid)) != NC_NOERR) { ^ htk2nc.cpp:601:14: error: ‘ret’ was not declared in this scope if ((ret = nc_def_dim(ncid, "maxLabelLength", maxLabelLength, &mll_dimid)) != NC_NOERR) { ^ htk2nc.cpp:613:14: error: ‘ret’ was not declared in this scope if ((ret = nc_def_var(ncid, "labels", NC_CHAR, 2, class_list_dimids, &class_list_varid)) != NC_NOERR) { ^ htk2nc.cpp:622:10: error: ‘ret’ was not declared in this scope if ((ret = nc_def_var(ncid, "seqTags", NC_CHAR, 2, seqTags_dimids, &seqTags_varid)) != NC_NOERR) { ^ htk2nc.cpp:630:10: error: ‘ret’ was not declared in this scope if ((ret = nc_def_var(ncid, "seqLengths", NC_INT, 1, seqLengths_dimids, &seqLengths_varid)) != NC_NOERR) { ^ htk2nc.cpp:638:10: error: ‘ret’ was not declared in this scope if ((ret = nc_def_var(ncid, "inputs", NC_FLOAT, 2, input_dimids, &inputs_varid)) != NC_NOERR) { ^ htk2nc.cpp:648:14: error: ‘ret’ was not declared in this scope if ((ret = nc_def_var(ncid, "targetClasses", NC_INT, 1, labels_dimids, &labels_varid)) != NC_NOERR) { ^ htk2nc.cpp:656:14: error: ‘ret’ was not declared in this scope if ((ret = nc_def_var(ncid, "targetPatterns", NC_FLOAT, 2, output_dimids, &outputs_varid)) != NC_NOERR) { ^ htk2nc.cpp:663:10: error: ‘ret’ was not declared in this scope if ((ret = nc_enddef(ncid)) != NC_NOERR) { ^ htk2nc.cpp:674:18: error: ‘ret’ was not declared in this scope if ((ret = nc_put_vara_text(ncid, class_list_varid, start, count, labels[0][l].c_str())) != NC_NOERR) { ^ htk2nc.cpp:685:14: error: ‘ret’ was not declared in this scope if ((ret = nc_put_vara_text(ncid, seqTags_varid, start, count, seqTags[s].c_str())) != NC_NOERR) { ^ htk2nc.cpp:692:10: error: ‘ret’ was not declared in this scope if ((ret = nc_put_var_int(ncid, seqLengths_varid, seqLenArr)) != NC_NOERR) { ^ htk2nc.cpp:718:13: error: ‘ret’ was not declared in this scope ret = readHtk(mapping[s][f].c_str(), &h); ^ htk2nc.cpp:732:14: error: ‘ret’ was not declared in this scope if ((ret = nc_put_vara_float(ncid, inputs_varid, start, count, inp_buf)) != NC_NOERR) { ^ htk2nc.cpp:747:17: error: ‘ret’ was not declared in this scope ret = read_label_file(mapping[s][nInputs].c_str(), labelMap[0], label_buf, seqLens[s]); ^ htk2nc.cpp:749:17: error: ‘ret’ was not declared in this scope ret = read_label_file(mapping[s][nInputs].c_str(), label_buf, seqLens[s], nClasses); ^ htk2nc.cpp:750:17: error: ‘ret’ was not declared in this scope if (ret != 0) { ^ htk2nc.cpp:756:18: error: ‘ret’ was not declared in this scope if ((ret = nc_put_vara_int(ncid, labels_varid, start_l, count_l, label_buf)) != NC_NOERR) { ^ htk2nc.cpp:767:17: error: ‘ret’ was not declared in this scope ret = readHtk(mapping[s][f].c_str(), &h); ^ htk2nc.cpp:780:18: error: ‘ret’ was not declared in this scope if ((ret = nc_put_vara_float(ncid, outputs_varid, start, count, outp_buf)) != NC_NOERR) { ^

What should I do?

— Reply to this email directly or view it on GitHub https://github.com/naxingyu/lstm-rnn/issues/2.

VeliBaba commented 9 years ago

Thanks. I can not understand input file format for this application. Can you explain it? And an example command line would be better

sthenc commented 9 years ago

The map file is basically a .txt file which gives the locations of htk feature files.

I think it is something like this:

prefix input_feature_path target_feature_path

sthenc commented 9 years ago

Of course one line per feature.

You can get the idea by reading chapter 5 of this document: http://sourceforge.net/projects/currennt/files/?source=navbar

htk2nc is a tool from that project.

sthenc commented 9 years ago

Also, you can take a look at my "nc_packer" repository.

I wrote some python scripts for automating the .nc feature database generation, you might be able to reuse them.