sublime text編譯時提示錯誤[Decode error - output not utf-8] compilation terminated
在ST3裡寫了一個C++程式,如下:
#include
using namespace std;
int main()
{
float a,b;
char oper;
cout <<"請輸入一個表示式(eg.1+2):" <>a >>oper >>b;
if (oper=='+')
{
cout <
[Decode error - output not utf-8]
compilation terminated.
[Finished in 0.1s]
經過百度,找到了一些針對python和java程式遇到這個問題的解決辦法.
不過我的程式畢竟是c++,但我仍然找到了一些相同之處,通過試驗果然解決掉了。
解決辦法如下:
1、首先在Preferences裡點選Browse Packages:
2、然後在裡面找到User,點選進入:
3、找到C.sublime-build,點選開啟檔案,看到如下:
{
"cmd": ["g++", "${file}", "-o", "${file_path}/${file_base_name}"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.c++",
"variants":
[
{
"name": "Run",
"cmd": ["cmd", "/c", "g++", "${file}", "-o", "${file_path}/${file_base_name}", "&&", "cmd", "/c", "${file_path}/${file_base_name}"]
},
{
"name": "RunInCommand",
"cmd": ["cmd", "/c", "g++", "${file}", "-o", "${file_path}/${file_base_name}", "&&", "start", "cmd", "/c", "${file_path}/${file_base_name} & pause"]
}
]
}
"encoding":"cp936",
注意有逗號
然後儲存後,重啟ST3,問題就解決啦。
另外針對python檔案和java檔案,修改的方法是一致的,只是要修改的檔案不同:java是JavaC.sublime-build檔案和Python.sublime-build檔案
Java的參考部落格是:
http://blog.csdn.net/chszs/article/details/8232077
Python的參考部落格是:
相關文章
- sublime Text3編譯java檔案提示Decode error - output not utf-8編譯JavaError
- Sublime Text: [Decode error - output not utf-8]Error
- 用sublime Text3編譯java檔案提示Decode error - output not utf-8編譯JavaError
- Sublime Text 2/3 [Decode error - output not utf-8]Error
- Sublime Text 2報 Decode error - output not utf-8 錯誤的解決辦法Error
- Sublime Text 2報“Decode error - output not utf-8”錯誤的解決辦法Error
- Sublime text 2/3 [Decode error - output not utf-8] 完美解決方法Error
- sublime 出現 [Decode error - output not utf-8]Error
- Sublime報Decode error - output not utf-8 or cp936 錯誤的解決辦法Error
- Sublime下python 報錯[Decode error - output not utf-8]解決辦法PythonError
- 使用 Sublime 工具時報Decode error - output not utf-8解決辦法Error
- sublime上配置java環境,解決Decode error - output not utf-8問題JavaError
- python編碼問題之——Decode error - output not utf-8PythonError
- cx_Oracle.DatabaseError: [Decode error - output not utf-8]OracleDatabaseError
- [Decode error - output not utf-8] lua 使用string.subError
- 網站編譯錯誤 Server Error in '/' Application Compilation Error error code -1073741502 csc.exe網站編譯ServerErrorAPP
- 使用 Sublime Text 3 編譯 C 語言編譯
- sublime text 3繫結lua編譯器編譯
- Python——Output not utf-8錯誤解決辦法Python
- Could not decode a text frame as UTF-8 的解決
- Sublime Text3 自動編譯less 的配置編譯
- ndk編譯錯誤:error: 'override' does not name a type編譯ErrorIDE
- xcode6編譯錯誤,提示Expected a typeXCode編譯
- 精讀《手寫 SQL 編譯器 - 錯誤提示》SQL編譯
- benq,我下了signup,編譯的時候明明編譯了Mysql.java,但在編譯別的檔案時老提示如下錯誤:ENQ編譯MySqlJava
- PHP編譯安裝時常見錯誤解決辦法,php編譯常見錯誤PHP編譯
- VS 編譯錯誤編譯
- Sublime修復錯誤【xcrun: error: invalid active developer path… 】ErrorDeveloper
- Sublime Text3中 less 自動編譯成 css 的方法編譯CSS
- 程式碼編輯器:sublime text for MacMac
- 編譯錯誤導致浪費10多分鐘, 編譯錯誤的提示:xxx does not name a type xxx編譯
- Docker環境編譯時的錯誤記錄Docker編譯
- ipvs編譯錯誤編譯
- php編譯小錯誤PHP編譯
- 編譯PHP的錯誤編譯PHP
- Ubuntu 16.04下指定Sublime Text 3 預設python編譯版本UbuntuPython編譯
- Composer 提示 zlib_decode (): data errorError
- Sublime Text 4 for Mac(程式碼編輯器)Mac