kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #23857
Re: [PATCH] Enable C++11
Le 21/03/2016 16:13, Wayne Stambaugh a écrit :
> Going, going, gone! Since I haven't gotten any objections, I committed
> the patch to enable C++11. Thanks Simon for the patch but be prepared
> for the grumbling. :)
>
On Ubuntu 14.04 LTS - 64 bits (with latest update) I have an issue when
compiling pcbnewPYTHON_wrap.cxx.
With no python support, Kicad itself compiles without any problem.
but with python support, I have the attached error.
I am not especially motivated to fix it, and I do not have a lot of
experience about swig. Each test takes *a bunch of* time.
If someone has an idea about a fix and can help, he is welcome!
Despite of this issue, I am thinking using C++11 features is a good idea.
--
Jean-Pierre CHARRAS
Scanning dependencies of target pcbnew_kiface
/home/jpc/kicad-launchpad/testing/Build/Release_gtk2/pcbnew/scripting/pcbnewPYTHON_wrap.cxx: In function 'PyObject* _wrap_str_utf8_Map_erase__SWIG_2(PyObject*, PyObject*)':
/home/jpc/kicad-launchpad/testing/Build/Release_gtk2/pcbnew/scripting/pcbnewPYTHON_wrap.cxx:29887:26: error: no matching function for call to 'std::map<std::basic_string<char>, UTF8, std::less<std::basic_string<char> >, std::allocator<std::pair<const std::basic_string<char>, UTF8> > >::erase(SwigValueWrapper<std::_Rb_tree_iterator<std::pair<const std::basic_string<char>, UTF8> > >&, SwigValueWrapper<std::_Rb_tree_iterator<std::pair<const std::basic_string<char>, UTF8> > >&)'
(arg1)->erase(arg2,arg3);
^
/home/jpc/kicad-launchpad/testing/Build/Release_gtk2/pcbnew/scripting/pcbnewPYTHON_wrap.cxx:29887:26: note: candidates are:
In file included from /usr/include/c++/4.8/map:61:0,
from /home/jpc/kicad-launchpad/testing/Build/Release_gtk2/pcbnew/scripting/pcbnewPYTHON_wrap.cxx:4981:
/usr/include/c++/4.8/bits/stl_map.h:690:7: note: std::map<_Key, _Tp, _Compare, _Alloc>::iterator std::map<_Key, _Tp, _Compare, _Alloc>::erase(std::map<_Key, _Tp, _Compare, _Alloc>::const_iterator) [with _Key = std::basic_string<char>; _Tp = UTF8; _Compare = std::less<std::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::basic_string<char>, UTF8> >; std::map<_Key, _Tp, _Compare, _Alloc>::iterator = std::_Rb_tree_iterator<std::pair<const std::basic_string<char>, UTF8> >; std::map<_Key, _Tp, _Compare, _Alloc>::const_iterator = std::_Rb_tree_const_iterator<std::pair<const std::basic_string<char>, UTF8> >]
erase(const_iterator __position)
^
/usr/include/c++/4.8/bits/stl_map.h:690:7: note: candidate expects 1 argument, 2 provided
/usr/include/c++/4.8/bits/stl_map.h:696:7: note: std::map<_Key, _Tp, _Compare, _Alloc>::iterator std::map<_Key, _Tp, _Compare, _Alloc>::erase(std::map<_Key, _Tp, _Compare, _Alloc>::iterator) [with _Key = std::basic_string<char>; _Tp = UTF8; _Compare = std::less<std::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::basic_string<char>, UTF8> >; std::map<_Key, _Tp, _Compare, _Alloc>::iterator = std::_Rb_tree_iterator<std::pair<const std::basic_string<char>, UTF8> >]
erase(iterator __position)
^
/usr/include/c++/4.8/bits/stl_map.h:696:7: note: candidate expects 1 argument, 2 provided
/usr/include/c++/4.8/bits/stl_map.h:726:7: note: std::map<_Key, _Tp, _Compare, _Alloc>::size_type std::map<_Key, _Tp, _Compare, _Alloc>::erase(const key_type&) [with _Key = std::basic_string<char>; _Tp = UTF8; _Compare = std::less<std::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::basic_string<char>, UTF8> >; std::map<_Key, _Tp, _Compare, _Alloc>::size_type = long unsigned int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::basic_string<char>]
erase(const key_type& __x)
^
/usr/include/c++/4.8/bits/stl_map.h:726:7: note: candidate expects 1 argument, 2 provided
/usr/include/c++/4.8/bits/stl_map.h:746:7: note: std::map<_Key, _Tp, _Compare, _Alloc>::iterator std::map<_Key, _Tp, _Compare, _Alloc>::erase(std::map<_Key, _Tp, _Compare, _Alloc>::const_iterator, std::map<_Key, _Tp, _Compare, _Alloc>::const_iterator) [with _Key = std::basic_string<char>; _Tp = UTF8; _Compare = std::less<std::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::basic_string<char>, UTF8> >; std::map<_Key, _Tp, _Compare, _Alloc>::iterator = std::_Rb_tree_iterator<std::pair<const std::basic_string<char>, UTF8> >; std::map<_Key, _Tp, _Compare, _Alloc>::const_iterator = std::_Rb_tree_const_iterator<std::pair<const std::basic_string<char>, UTF8> >]
erase(const_iterator __first, const_iterator __last)
^
/usr/include/c++/4.8/bits/stl_map.h:746:7: note: no known conversion for argument 1 from 'SwigValueWrapper<std::_Rb_tree_iterator<std::pair<const std::basic_string<char>, UTF8> > >' to 'std::map<std::basic_string<char>, UTF8, std::less<std::basic_string<char> >, std::allocator<std::pair<const std::basic_string<char>, UTF8> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const std::basic_string<char>, UTF8> >}'
Application: kicad
Version: (2016-03-21 BZR 6636)-product, release build
Libraries: wxWidgets 3.0.2
libcurl/7.35.0 GnuTLS/2.12.23 zlib/1.2.8 libidn/1.28 librtmp/2.3
Platform: Linux 3.13.0-83-generic x86_64, 64 bit, Little endian, wxGTK
- Build Info -
wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8)
Boost: 1.54.0
Curl: 7.35.0
KiCad - Compiler: GCC 4.8.4 with C++ ABI 1002
Settings: USE_WX_GRAPHICS_CONTEXT=OFF
USE_WX_OVERLAY=OFF
KICAD_SCRIPTING=OFF
KICAD_SCRIPTING_MODULES=OFF
KICAD_SCRIPTING_WXPYTHON=OFF
USE_FP_LIB_TABLE=HARD_CODED_ON
BUILD_GITHUB_PLUGIN=ON
Follow ups
References