开发者社区 问答 正文

sublime text2无法编译c++:报错

Running g++ F:\test\firstTest3.cpp -o F:\test/firstTest3
Traceback (most recent call last):
  File ".\sublime_plugin.py", line 337, in run_
  File ".\exec.py", line 154, in run
  File ".\exec.py", line 45, in init
UnicodeDecodeError: 'ascii' codec can't decode byte 0xb1 in position 3: ordinal not in range(128)

展开
收起
kun坤 2020-06-14 09:53:57 756 分享 版权
1 条回答
写回答
取消 提交回答
  • exec.py的 40行是不是这个

    os.environ["PATH"] = os.path.expandvars(path).encode(sys.getfilesystemencoding())


    45行 换成 

    proc_env[k]=os.path.expandvars(v.decode(sys.getfilesystemencoding())).encode(sy

    s.getfilesystemencoding()) 


    ###### http://blog.163.com/double_dua/blog/static/18973918320126124432099/######谢了  果然如此
    2020-06-14 09:54:01
    赞同 展开评论