我的全球分销银行与wiki中的相同,只是我将路径替换为打印机.py. 在python
import sys
sys.path.insert(0, 'C:/Program Files (x86)/mingw-builds/x32-4.8.1-posix-dwarf-rev3/mingw32/share/gcc-4.8.1/python/libstdcxx/v6')
from printers import register_libstdcxx_printers
register_libstdcxx_printers (None)
end
然后我测试了一下:
^{pr2}$
错误信息显示:Traceback (most recent call last):
File "", line 4, in
File "C:/Program Files (x86)/mingw-builds/x32-4.8.1-posix-dwarf-rev3/mingw32/
share/gcc-4.8.1/python/libstdcxx/v6/printers.py", line 911, in register_libstdcxx_printers
gdb.printing.register_pretty_printer(obj, libstdcxx_printer)
File "c:\program files (x86)\mingw-builds\x32-4.8.1-posix-dwarf-rev3\mingw32\
share\gdb/python/gdb/printing.py", line 146, in register_pretty_printer
printer.name)
RuntimeError: pretty-printer already registered: libstdc++-v6
C:\Program Files (x86)\mingw-builds\x32-4.8.1-posix-dwarf-rev3\mingw32\bin\pp.gd
b:6: Error in sourced command file:
Error while executing Python code.
我怎样才能修好它?在