-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcpp_sublimelinter.html
More file actions
573 lines (410 loc) · 41.6 KB
/
cpp_sublimelinter.html
File metadata and controls
573 lines (410 loc) · 41.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
<!DOCTYPE html>
<html>
<head>
<title>
sublime text3 配置c++开发环境SublimeLinter | 雅乐网 </title>
<meta charset="UTF-8" />
<meta name="renderer" content="webkit">
<link rel="stylesheet" href="http://www.yalewoo.com/wp-content/themes/YLW3_lite/style.css" type="text/css" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://www.yalewoo.com/feed" />
<!-- All in One SEO Pack 2.3.12.1 by Michael Torbert of Semper Fi Web Design[-1,-1] -->
<meta name="description" content="本文介绍windows下sublime text 3配置代码静态检查工具cppcheck的方法。" />
<link rel="canonical" href="http://www.yalewoo.com/cpp_sublimelinter.html" />
<!-- /all in one seo pack -->
<link rel="alternate" type="application/rss+xml" title="雅乐网 » sublime text3 配置c++开发环境SublimeLinter评论Feed" href="http://www.yalewoo.com/cpp_sublimelinter.html/feed" />
<link rel='stylesheet' id='crayon-css' href='http://www.yalewoo.com/wp-content/plugins/crayon-syntax-highlighter/css/min/crayon.min.css?ver=_2.7.2_beta' type='text/css' media='all' />
<script type='text/javascript' src='https://lib.sinaapp.com/js/jquery/1.8.2/jquery.min.js'></script>
<script type='text/javascript'>
/* <![CDATA[ */
var CrayonSyntaxSettings = {"version":"_2.7.2_beta","is_admin":"0","ajaxurl":"http:\/\/www.yalewoo.com\/wp-admin\/admin-ajax.php","prefix":"crayon-","setting":"crayon-setting","selected":"crayon-setting-selected","changed":"crayon-setting-changed","special":"crayon-setting-special","orig_value":"data-orig-value","debug":""};
var CrayonSyntaxStrings = {"copy":"\u4f7f\u7528 %s \u590d\u5236\uff0c\u4f7f\u7528 %s \u7c98\u8d34\u3002","minimize":"\u70b9\u51fb\u5c55\u5f00\u4ee3\u7801"};
/* ]]> */
</script>
<script type='text/javascript' src='http://www.yalewoo.com/wp-content/plugins/crayon-syntax-highlighter/js/min/crayon.min.js?ver=_2.7.2_beta'></script>
<link rel='prev' title='github版面混乱加载不出css的解决办法' href='http://www.yalewoo.com/github_load_css.html' />
<link rel='next' title='计数的方法:可重组合和全排列' href='http://www.yalewoo.com/permutations_and_combinations2.html' />
<link rel='shortlink' href='http://www.yalewoo.com/?p=1500' />
<link rel="stylesheet" href="http://www.yalewoo.com/wp-content/plugins/wp-content-index/style.css" type="text/css" media="all" />
<!-- Start Of Script Generated By WP-PostViews -->
<script type="text/javascript">
/* <![CDATA[ */
jQuery.ajax({type:'GET',url:'http://www.yalewoo.com/wp-admin/admin-ajax.php',data:'postviews_id=1500&action=postviews',cache:false});/* ]]> */
jQuery(document).ready(function() {
var ajax_data = {
action: "show_postview",
postviews_id: 1500
};
$.post("http://www.yalewoo.com/wp-admin/admin-ajax.php", ajax_data,
function(data) {
$('.meta-view').html(data);
});
return false;
});
</script>
<!-- End Of Script Generated By WP-PostViews -->
<script src="http://www.yalewoo.com/wp-content/themes/YLW3_lite/js/jquery.lazyload.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
$("#secondary img").lazyload({
effect:"fadeIn"
});
});
$(function() {
$("img").lazyload({
effect:"fadeIn"
});
});
</script>
<!--[if lte IE 8]><script>document.write("<p style=\"color:red;font-size:40px;\">你正在使用 Internet Explorer 的过期版本(IE6、IE7、IE8)<br/>请<a href=\"#\" style=\"color:blue;\">升级您的浏览器</a>获得更好的浏览体验。</p>");</script><![endif]-->
</head><body>
<header id="topheader">
<hgroup>
<h1><a href = "http://www.yalewoo.com">雅乐网</a>
</h1>
<h2>计算机技术博客</h2>
</hgroup>
<div id="top_menu">
<div class="menu-%e6%9c%80%e9%a1%b6%e7%ab%af-container"><ul id="menu-%e6%9c%80%e9%a1%b6%e7%ab%af" class="menu"><li id="menu-item-663" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-663"><a href="http://www.yalewoo.com/about">关于本站</a></li>
<li id="menu-item-662" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-662"><a href="http://www.yalewoo.com/updates">雅乐网更新记录</a></li>
<li id="menu-item-661" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-661"><a target="_blank" href="http://www.yalewoo.com/old0/">老版网站</a></li>
</ul></div> <form method="get" id="searchform" action="http://www.yalewoo.com/">
<div>
<input type="text" value="" name="s" id="s" size="15" />
<input type="submit" id="searchsubmit" value="Search" />
</div>
</form> </div>
</header>
<nav class="main_nav">
<div class="menu-%e4%b8%bb%e8%8f%9c%e5%8d%9520171106-container"><ul id="menu-%e4%b8%bb%e8%8f%9c%e5%8d%9520171106" class="menu"><li id="menu-item-3235" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-home menu-item-3235"><a href="http://www.yalewoo.com/">首页</a></li>
<li id="menu-item-3236" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3236"><a href="http://www.yalewoo.com/computer_science">计算机</a></li>
<li id="menu-item-3237" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-3237"><a href="http://www.yalewoo.com/programming">编程</a>
<ul class="sub-menu">
<li id="menu-item-3238" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3238"><a href="http://www.yalewoo.com/programming/c_cpp">C/C++</a></li>
<li id="menu-item-3243" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3243"><a href="http://www.yalewoo.com/programming/data_structure">数据结构</a></li>
<li id="menu-item-3244" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3244"><a href="http://www.yalewoo.com/programming/basic_algorithm">算法</a></li>
<li id="menu-item-3240" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3240"><a href="http://www.yalewoo.com/programming/online_judge">OJ刷题</a></li>
<li id="menu-item-3239" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3239"><a href="http://www.yalewoo.com/programming/linux">Linux</a></li>
<li id="menu-item-3241" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-3241"><a href="http://www.yalewoo.com/programming/web">Web</a>
<ul class="sub-menu">
<li id="menu-item-3242" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3242"><a href="http://www.yalewoo.com/programming/web/wordpress">wordpress</a></li>
</ul>
</li>
</ul>
</li>
<li id="menu-item-3245" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-3245"><a href="http://www.yalewoo.com/algorithm">算法</a>
<ul class="sub-menu">
<li id="menu-item-3248" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3248"><a href="http://www.yalewoo.com/algorithm/maths">数学</a></li>
<li id="menu-item-3246" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3246"><a href="http://www.yalewoo.com/algorithm/ml_notes">机器学习</a></li>
<li id="menu-item-3281" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3281"><a href="http://www.yalewoo.com/algorithm/deep_learning">深度学习</a></li>
<li id="menu-item-3247" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3247"><a href="http://www.yalewoo.com/algorithm/python">python</a></li>
<li id="menu-item-3253" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3253"><a href="http://www.yalewoo.com/algorithm/%e7%a4%be%e5%9b%a2%e6%a3%80%e6%b5%8b">社团检测</a></li>
</ul>
</li>
<li id="menu-item-3254" class="menu-item menu-item-type-taxonomy menu-item-object-category current-post-ancestor menu-item-has-children menu-item-3254"><a href="http://www.yalewoo.com/tools">工具教程</a>
<ul class="sub-menu">
<li id="menu-item-3255" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3255"><a href="http://www.yalewoo.com/tools/git">Git/GitHub</a></li>
<li id="menu-item-3256" class="menu-item menu-item-type-taxonomy menu-item-object-category current-post-ancestor current-menu-parent current-post-parent menu-item-3256"><a href="http://www.yalewoo.com/tools/sublime_text">Sublime Text</a></li>
<li id="menu-item-3257" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3257"><a href="http://www.yalewoo.com/tools/vs2013">VS2013</a></li>
<li id="menu-item-3259" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3259"><a href="http://www.yalewoo.com/tools/browser">浏览器</a></li>
<li id="menu-item-3258" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3258"><a href="http://www.yalewoo.com/tools/other_tools">其他工具</a></li>
</ul>
</li>
<li id="menu-item-3260" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-3260"><a href="http://www.yalewoo.com/excellent_softwares">软件推荐</a>
<ul class="sub-menu">
<li id="menu-item-3261" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3261"><a href="http://www.yalewoo.com/excellent_softwares/zip">压缩加密</a></li>
<li id="menu-item-3262" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3262"><a href="http://www.yalewoo.com/excellent_softwares/pictools">图片工具</a></li>
<li id="menu-item-3263" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3263"><a href="http://www.yalewoo.com/excellent_softwares/media_tools">多媒体</a></li>
<li id="menu-item-3264" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3264"><a href="http://www.yalewoo.com/excellent_softwares/safe_software">安全清理</a></li>
<li id="menu-item-3265" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3265"><a href="http://www.yalewoo.com/excellent_softwares/android">安卓</a></li>
<li id="menu-item-3266" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3266"><a href="http://www.yalewoo.com/excellent_softwares/utility">实用工具</a></li>
<li id="menu-item-3267" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3267"><a href="http://www.yalewoo.com/excellent_softwares/search_tools">搜索词典</a></li>
<li id="menu-item-3268" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3268"><a href="http://www.yalewoo.com/excellent_softwares/efficiency_tools">效率提升</a></li>
<li id="menu-item-3269" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3269"><a href="http://www.yalewoo.com/excellent_softwares/programming_tools">编程开发</a></li>
<li id="menu-item-3270" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3270"><a href="http://www.yalewoo.com/excellent_softwares/internet_software">网络软件</a></li>
<li id="menu-item-3271" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3271"><a href="http://www.yalewoo.com/excellent_softwares/edit_and_reading">阅读编辑</a></li>
</ul>
</li>
<li id="menu-item-3272" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-3272"><a href="http://www.yalewoo.com/it_resource">资源</a>
<ul class="sub-menu">
<li id="menu-item-3273" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3273"><a href="http://www.yalewoo.com/it_resource/good_websites">好网站</a></li>
<li id="menu-item-3274" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3274"><a href="http://www.yalewoo.com/it_resource/stuff">好资料</a></li>
<li id="menu-item-3275" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3275"><a href="http://www.yalewoo.com/it_resource/how">授人以渔</a></li>
<li id="menu-item-3276" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3276"><a href="http://www.yalewoo.com/it_resource/ebooks-share">电子书</a></li>
</ul>
</li>
<li id="menu-item-3277" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-3277"><a href="http://www.yalewoo.com/learning">我爱学习</a>
<ul class="sub-menu">
<li id="menu-item-3278" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3278"><a href="http://www.yalewoo.com/learning/popular_science">科普</a></li>
<li id="menu-item-3279" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3279"><a href="http://www.yalewoo.com/learning/english">英语</a></li>
</ul>
</li>
<li id="menu-item-3280" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-3280"><a href="http://www.yalewoo.com/about">关于本站</a></li>
</ul></div></nav>
<script type="text/javascript" src="http://www.yalewoo.com/wp-content/themes/YLW3_lite/js/dianzan.js"></script>
<div id="mbxdh">
<div>
<a href="http://www.yalewoo.com/tools">工具教程</a> » <a href="http://www.yalewoo.com/tools/sublime_text">Sublime Text</a> » sublime text3 配置c++开发环境SublimeLinter </div>
</div>
<div id="container">
<section class="whole_article" id="article-1500">
<article class="post-1500 post type-post status-publish format-standard hentry category-sublime_text tag-sublime-text" id="entry">
<h2 id="article-title">
<span class = "title-meta-yuanchuang title-meta-ico"></span>
<a href="http://www.yalewoo.com/cpp_sublimelinter.html" title="sublime text3 配置c++开发环境SublimeLinter">sublime text3 配置c++开发环境SublimeLinter</a>
<span class = "title-meta-huo title-meta-ico"></span>
</h2>
<div class="post-meta">
<span class="meta-author meta-ico"><a href="http://www.yalewoo.com/author/yalewoo" title="由yalewoo发布" rel="author">yalewoo</a> </span>
<span class="meta-time meta-ico"> 最后修改于 2016-03-28</span>
发表于 2015-04-05
<span class="meta-view meta-ico">8,200</span>
<span class="meta-comment meta-ico"><a href="http://www.yalewoo.com/cpp_sublimelinter.html#comments">6</a></span>
<br><br>
<span class="meta-category meta-ico"> <a href="http://www.yalewoo.com/tools/sublime_text" rel="category tag">Sublime Text</a> </span>
<span class="meta-category meta-ico"> <a href="http://www.yalewoo.com/tag/sublime-text" rel="tag">sublime text</a> </span>
</div>
<div id="article-content">
<div id="content-index" class="content-index" style="margin:0 0 10px 10px;float:right;"><span class="content-index-toctoggle">[<a id="content-index-togglelink" href="javascript:content_index_toggleToc()">目录开关</a>]</span>
<script type="text/javascript" language="javascript">
window.content_index_showTocToggle=true;function content_index_toggleToc(){var tts="显示目录";var tth="隐藏目录";if(window.content_index_showTocToggle){window.content_index_showTocToggle=false;document.getElementById("content-index-contents").style.display="block";document.getElementById("content-index-togglelink").innerHTML=tth}else{window.content_index_showTocToggle=true;document.getElementById("content-index-contents").style.display="none";document.getElementById("content-index-togglelink").innerHTML=tts}}
</script>
<ul id="content-index-contents"><li class="content-index-level-1"><a href="http://www.yalewoo.com/cpp_sublimelinter.html#安装Cppcheck" title="安装Cppcheck"><em>1</em><span>安装Cppcheck</span></a></li><li class="content-index-level-1"><a href="http://www.yalewoo.com/cpp_sublimelinter.html#安装SublimeLinter和SublimeLinter-cppcheck" title="安装SublimeLinter和SublimeLinter-cppcheck"><em>2</em><span>安装SublimeLinter和SublimeLinter-cppcheck</span></a></li><li class="content-index-level-1"><a href="http://www.yalewoo.com/cpp_sublimelinter.html#激活Linter和Linting" title="激活Linter和Linting"><em>3</em><span>激活Linter和Linting</span></a></li><li class="content-index-level-1"><a href="http://www.yalewoo.com/cpp_sublimelinter.html#使用" title="使用"><em>4</em><span>使用</span></a></li><li class="content-index-level-1"><a href="http://www.yalewoo.com/cpp_sublimelinter.html#快捷键" title="快捷键"><em>5</em><span>快捷键</span></a></li></ul></div>
<h3 id="安装Cppcheck">安装Cppcheck</h3>
<p>下载地址 <a target="_blank" title="http://sourceforge.net/projects/cppcheck/" href="http://sourceforge.net/projects/cppcheck/" target="_blank">http://sourceforge.net/projects/cppcheck/</a>,</p>
<p>百度云地址:<a target="_blank" title="http://pan.baidu.com/s/1mgl6W9U" href="http://pan.baidu.com/s/1mgl6W9U" target="_blank">http://pan.baidu.com/s/1mgl6W9U</a></p>
<p>将安装目录添加到环境变量中</p>
<p><a target="_blank" href="http://7d9rd6.com1.z0.glb.clouddn.com/wp-content/uploads/2015/04/scrn20150405173250.png"><img class="alignnone size-full wp-image-1501" data-original="http://7d9rd6.com1.z0.glb.clouddn.com/wp-content/uploads/2015/04/scrn20150405173250.png" src="http://www.yalewoo.com/wp-content/themes/YLW3_lite/img/loading.gif" alt="scrn20150405173250" width="473" height="176" /></a></p>
<noscript><img class="alignnone size-full wp-image-1501" src="http://7d9rd6.com1.z0.glb.clouddn.com/wp-content/uploads/2015/04/scrn20150405173250.png" alt="scrn20150405173250" width="473" height="176" /></a></p></noscript>
<p><span style="color: #ff0000;"><strong><span style="font-size: 24pt;">然后重启电脑。</span></strong></span>这一步很重要。我因为没有重启,虽然命令行可以使用cppcheck了,但是sublime中一直提示没有错误。</p>
<h3 id="安装SublimeLinter和SublimeLinter-cppcheck">安装SublimeLinter和SublimeLinter-cppcheck</h3>
<p>首先下载插件管理器<a target="_blank" href="http://sublime.wbond.net/Package%20Control.sublime-package" target="_blank" rel="nofollow">Package Control</a>到Sublime Text 3 的插件目录下(Preference–Browse Packages上级目录Installed packages下),然后按下Ctrl+Shift+P调出控制面板,输入install,点击Package Control: Install Package,就可以查找并安装各种插件了。</p>
<p><a target="_blank" href="http://7d9rd6.com1.z0.glb.clouddn.com/wp-content/uploads/2015/04/2015-04-05-17_39_59-F__KP_Practice_cpp_test.cpp-Sublime-Text.png"><img class="alignnone size-full wp-image-1505" data-original="http://7d9rd6.com1.z0.glb.clouddn.com/wp-content/uploads/2015/04/2015-04-05-17_39_59-F__KP_Practice_cpp_test.cpp-Sublime-Text.png" src="http://www.yalewoo.com/wp-content/themes/YLW3_lite/img/loading.gif" alt="2015-04-05 17_39_59-F__KP_Practice_cpp_test.cpp - Sublime Text" width="394" height="73" /></a></p>
<noscript><img class="alignnone size-full wp-image-1505" src="http://7d9rd6.com1.z0.glb.clouddn.com/wp-content/uploads/2015/04/2015-04-05-17_39_59-F__KP_Practice_cpp_test.cpp-Sublime-Text.png" alt="2015-04-05 17_39_59-F__KP_Practice_cpp_test.cpp - Sublime Text" width="394" height="73" /></a></p></noscript>
<p>要安装的插件:</p>
<p><a target="_blank" href="http://7d9rd6.com1.z0.glb.clouddn.com/wp-content/uploads/2015/04/2015-04-05-17_40_42-F__KP_Practice_cpp_test.cpp-Sublime-Text.png"><img class="alignnone size-full wp-image-1506" data-original="http://7d9rd6.com1.z0.glb.clouddn.com/wp-content/uploads/2015/04/2015-04-05-17_40_42-F__KP_Practice_cpp_test.cpp-Sublime-Text.png" src="http://www.yalewoo.com/wp-content/themes/YLW3_lite/img/loading.gif" alt="2015-04-05 17_40_42-F__KP_Practice_cpp_test.cpp - Sublime Text" width="461" height="169" /></a></p>
<noscript><img class="alignnone size-full wp-image-1506" src="http://7d9rd6.com1.z0.glb.clouddn.com/wp-content/uploads/2015/04/2015-04-05-17_40_42-F__KP_Practice_cpp_test.cpp-Sublime-Text.png" alt="2015-04-05 17_40_42-F__KP_Practice_cpp_test.cpp - Sublime Text" width="461" height="169" /></a></p></noscript>
<h3 id="激活Linter和Linting">激活Linter和Linting</h3>
<p>Ctrl+Shift+P调出控制面板输入SublimeLinter,激活Linter和Linting 。如图是激活状态。</p>
<p><a target="_blank" href="http://7d9rd6.com1.z0.glb.clouddn.com/wp-content/uploads/2015/04/2015-04-05-17_35_10-F__KP_Practice_cpp_test.cpp-Sublime-Text.png"><img class="alignnone size-full wp-image-1502" data-original="http://7d9rd6.com1.z0.glb.clouddn.com/wp-content/uploads/2015/04/2015-04-05-17_35_10-F__KP_Practice_cpp_test.cpp-Sublime-Text.png" src="http://www.yalewoo.com/wp-content/themes/YLW3_lite/img/loading.gif" alt="2015-04-05 17_35_10-F__KP_Practice_cpp_test.cpp - Sublime Text" width="410" height="169" /></a></p>
<noscript><img class="alignnone size-full wp-image-1502" src="http://7d9rd6.com1.z0.glb.clouddn.com/wp-content/uploads/2015/04/2015-04-05-17_35_10-F__KP_Practice_cpp_test.cpp-Sublime-Text.png" alt="2015-04-05 17_35_10-F__KP_Practice_cpp_test.cpp - Sublime Text" width="410" height="169" /></a></p></noscript>
<h3 id="使用">使用</h3>
<p>通过菜单Tools -> SublimeLinter -> Mark Style,选择No Column Highlights Line。</p>
<p>完成以上设置后,错误代码即可实现高亮,效果如图所示:</p>
<p><a target="_blank" href="http://7d9rd6.com1.z0.glb.clouddn.com/wp-content/uploads/2015/04/2015-04-05-17_37_15-F__KP_Practice_cpp_test.cpp-Sublime-Text.png"><img class="alignnone size-full wp-image-1503" data-original="http://7d9rd6.com1.z0.glb.clouddn.com/wp-content/uploads/2015/04/2015-04-05-17_37_15-F__KP_Practice_cpp_test.cpp-Sublime-Text.png" src="http://www.yalewoo.com/wp-content/themes/YLW3_lite/img/loading.gif" alt="2015-04-05 17_37_15-F__KP_Practice_cpp_test.cpp - Sublime Text" width="494" height="375" /></a></p>
<noscript><img class="alignnone size-full wp-image-1503" src="http://7d9rd6.com1.z0.glb.clouddn.com/wp-content/uploads/2015/04/2015-04-05-17_37_15-F__KP_Practice_cpp_test.cpp-Sublime-Text.png" alt="2015-04-05 17_37_15-F__KP_Practice_cpp_test.cpp - Sublime Text" width="494" height="375" /></a></p></noscript>
<h3 id="快捷键">快捷键</h3>
<p>按Ctrl+K,然后按a 显示所有错误</p>
<p><a target="_blank" href="http://7d9rd6.com1.z0.glb.clouddn.com/wp-content/uploads/2015/04/2015-04-05-17_37_40-F__KP_Practice_cpp_test.cpp-Sublime-Text.png"><img class="alignnone size-full wp-image-1504" data-original="http://7d9rd6.com1.z0.glb.clouddn.com/wp-content/uploads/2015/04/2015-04-05-17_37_40-F__KP_Practice_cpp_test.cpp-Sublime-Text.png" src="http://www.yalewoo.com/wp-content/themes/YLW3_lite/img/loading.gif" alt="2015-04-05 17_37_40-F__KP_Practice_cpp_test.cpp - Sublime Text" width="557" height="252" /></a></p>
<noscript><img class="alignnone size-full wp-image-1504" src="http://7d9rd6.com1.z0.glb.clouddn.com/wp-content/uploads/2015/04/2015-04-05-17_37_40-F__KP_Practice_cpp_test.cpp-Sublime-Text.png" alt="2015-04-05 17_37_40-F__KP_Practice_cpp_test.cpp - Sublime Text" width="557" height="252" /></a></p></noscript>
<p>Ctrl+k, n 跳到下一个错误</p>
</div>
</article>
<div class="social-main">
<div class="post-like">
<a href="javascript:;" data-action="ding" data-id="1500" class="specsZan ">点赞 <span class="count">
1</span>
</a>
</div>
<div class="reward-button"><a href="http://www.yalewoo.com/denote" target="_blank">赏</a>
<span class="reward-code">
<span class="alipay-code"> <img class="alipay-img wdp-appear" src="http://www.yalewoo.com/wp-content/themes/YLW3_lite/img/alipay.png"><b>支付宝打赏</b> </span> <span class="wechat-code"> <img class="wechat-img wdp-appear" src="http://www.yalewoo.com/wp-content/themes/YLW3_lite/img/wechatpay.png"><b>微信打赏</b> </span>
</span>
</div>
<div class="post-like">
<a id="fenxianganniu" onClick="show_bdsharebox();">分享
</a>
</div>
<div class="bdsharebuttonbox" id="bdsharebuttonbox">
</div>
</div>
<div class="reward-notice">
<p class="">如果文章对你有帮助,欢迎点赞或打赏(金额不限)。你的打赏将全部用于支付网站服务器费用和提高网站文章质量,谢谢支持。</p>
</div>
<div class="article-copyright">
<b> 版权声明: </b>
<p> 本文由 <a href="http://www.yalewoo.com/author/yalewoo" title="由yalewoo发布" rel="author">yalewoo</a> 原创,商业转载请联系作者获得授权。 <br>非商业转载请注明作者 <a href="http://www.yalewoo.com/author/yalewoo" title="由yalewoo发布" rel="author">yalewoo</a> 或 <a href="http://www.yalewoo.com/" title="雅乐网" ?>雅乐网</a> ,并附带本文链接:<br><a href="http://www.yalewoo.com/cpp_sublimelinter.html" title=sublime text3 配置c++开发环境SublimeLinter>http://www.yalewoo.com/cpp_sublimelinter.html</a></p>
</div>
<div class="post-navigation">
<div class="post-previous">
<p>上一篇:</p>
<a href="http://www.yalewoo.com/github_load_css.html" rel="prev">github版面混乱加载不出css的解决办法</a> </div>
<div class="post-next">
<p>下一篇:</p>
<a href="http://www.yalewoo.com/permutations_and_combinations2.html" rel="next">计数的方法:可重组合和全排列</a> </div>
</div>
<div class="related_posts">
<p>与 <a href="http://www.yalewoo.com/tag/sublime-text" rel="tag">sublime text</a> 相关的文章</p>
<ul>
<li><a rel="bookmark" href="http://www.yalewoo.com/sublimegdb.html" title="Sublime Text 3 使用 SublimeGDB 图形化调试c/c++程序" target="_blank">Sublime Text 3 使用 SublimeGDB 图形化调试c/c++程序</a></li>
<li><a rel="bookmark" href="http://www.yalewoo.com/sublime_text_3_tutorial_3_search_and_replace.html" title="Sublime Text 3 教程 (3)——跳转、查找和替换" target="_blank">Sublime Text 3 教程 (3)——跳转、查找和替换</a></li>
<li><a rel="bookmark" href="http://www.yalewoo.com/sublime_text_3_python_build_system.html" title="sublime text 3如何配置自己的build-system,在命令行中运行python" target="_blank">sublime text 3如何配置自己的build-system,在命令行中运行python</a></li>
<li><a rel="bookmark" href="http://www.yalewoo.com/sublime_text_3_build_3083.html" title="Sublime Text 3 Build 3083更新内容" target="_blank">Sublime Text 3 Build 3083更新内容</a></li>
<li><a rel="bookmark" href="http://www.yalewoo.com/sublime-text_gtk.html" title="sublime text配置编译gtk程序" target="_blank">sublime text配置编译gtk程序</a></li>
<li><a rel="bookmark" href="http://www.yalewoo.com/sublime_text_3_gcc.html" title="sublime text 3配置c/c++编译环境" target="_blank">sublime text 3配置c/c++编译环境</a></li>
<li><a rel="bookmark" href="http://www.yalewoo.com/sublime_c_and_cpp.html" title="再谈sublime配置c/c++环境 自动针对c调用gcc 针对cpp调用g++" target="_blank">再谈sublime配置c/c++环境 自动针对c调用gcc 针对cpp调用g++</a></li>
<li><a rel="bookmark" href="http://www.yalewoo.com/sublime-text.html" title="【专题】sublime text编辑器" target="_blank">【专题】sublime text编辑器</a></li>
</ul>
</div>
<div class="comments-template">
<div id="comments" class="comments-area">
<h3 class="comments-title">
文章《sublime text3 配置c++开发环境SublimeLinter》共有6条评论:
</h3>
<ol class="comment-list">
<li class="comment even thread-even depth-1" id="li-comment-96">
<div id="comment-96" class="comment-one">
<div class="comment-author-avatar">
<img alt='' data-original="http://2.gravatar.com/avatar/58f3af47ecd0a0468097f251a8ff23fb?s=64&d=identicon&r=g" src="http://www.yalewoo.com/wp-content/themes/YLW3_lite/img/loading.gif" srcset='http://2.gravatar.com/avatar/58f3af47ecd0a0468097f251a8ff23fb?s=128&d=identicon&r=g 2x' class='avatar avatar-64 photo' height='64' width='64' />
<noscript><img alt='' src='http://2.gravatar.com/avatar/58f3af47ecd0a0468097f251a8ff23fb?s=64&d=identicon&r=g' srcset='http://2.gravatar.com/avatar/58f3af47ecd0a0468097f251a8ff23fb?s=128&d=identicon&r=g 2x' class='avatar avatar-64 photo' height='64' width='64' /></noscript> </div>
<div class="comment-body">
<div class="comment-author-name">
ScratchingBear </div>
<p>我照你的说法做了,为什么语法错了还是什么提示都没有?</p>
<div class="comment-meta">
<a href="http://www.yalewoo.com/cpp_sublimelinter.html#comment-96"><time datetime="2015-05-20T15:02:25+00:00">2015年5月20日 15:02</time></a>
<span class="reply">
<a rel='nofollow' class='comment-reply-link' href='http://www.yalewoo.com/cpp_sublimelinter.html?replytocom=96#respond' onclick='return addComment.moveForm( "comment-96", "96", "respond", "1500" )' aria-label='回复给ScratchingBear'>回复</a> </span>
</div>
</div>
</div>
<ul class="children">
<li class="comment byuser comment-author-yalewoo bypostauthor odd alt depth-2" id="li-comment-99">
<div id="comment-99" class="comment-one">
<div class="comment-author-avatar">
<img alt='' data-original="http://0.gravatar.com/avatar/62e19307736b9ce9073ce4c5f76e5407?s=64&d=identicon&r=g" src="http://www.yalewoo.com/wp-content/themes/YLW3_lite/img/loading.gif" srcset='http://0.gravatar.com/avatar/62e19307736b9ce9073ce4c5f76e5407?s=128&d=identicon&r=g 2x' class='avatar avatar-64 photo' height='64' width='64' />
<noscript><img alt='' src='http://0.gravatar.com/avatar/62e19307736b9ce9073ce4c5f76e5407?s=64&d=identicon&r=g' srcset='http://0.gravatar.com/avatar/62e19307736b9ce9073ce4c5f76e5407?s=128&d=identicon&r=g 2x' class='avatar avatar-64 photo' height='64' width='64' /></noscript> </div>
<div class="comment-body">
<div class="comment-author-name">
<a href='http://www.yalewoo.com/' target='_blank'>yalewoo</a> <span class="comment-author-is-bloger"> 作者</span> </div>
<p>你可以先试试按Ctrl+k,松开后按a 这是显示所有错误。如果弹出对话框说没有错误,可以检查一下cmd里运行cppcheck有没有反应。对了,cppcheck添加到环境变量后要重启windows。</p>
<div class="comment-meta">
<a href="http://www.yalewoo.com/cpp_sublimelinter.html#comment-99"><time datetime="2015-05-21T12:58:29+00:00">2015年5月21日 12:58</time></a>
<span class="reply">
<a rel='nofollow' class='comment-reply-link' href='http://www.yalewoo.com/cpp_sublimelinter.html?replytocom=99#respond' onclick='return addComment.moveForm( "comment-99", "99", "respond", "1500" )' aria-label='回复给yalewoo'>回复</a> </span>
</div>
</div>
</div>
</li><!-- #comment-## -->
</ul><!-- .children -->
</li><!-- #comment-## -->
<li class="comment even thread-odd thread-alt depth-1" id="li-comment-97">
<div id="comment-97" class="comment-one">
<div class="comment-author-avatar">
<img alt='' data-original="http://2.gravatar.com/avatar/58f3af47ecd0a0468097f251a8ff23fb?s=64&d=identicon&r=g" src="http://www.yalewoo.com/wp-content/themes/YLW3_lite/img/loading.gif" srcset='http://2.gravatar.com/avatar/58f3af47ecd0a0468097f251a8ff23fb?s=128&d=identicon&r=g 2x' class='avatar avatar-64 photo' height='64' width='64' />
<noscript><img alt='' src='http://2.gravatar.com/avatar/58f3af47ecd0a0468097f251a8ff23fb?s=64&d=identicon&r=g' srcset='http://2.gravatar.com/avatar/58f3af47ecd0a0468097f251a8ff23fb?s=128&d=identicon&r=g 2x' class='avatar avatar-64 photo' height='64' width='64' /></noscript> </div>
<div class="comment-body">
<div class="comment-author-name">
ScratchingBear </div>
<p>您说的激活Linter为什么我这里找不到呢?<br />
那个Linting我找到了</p>
<div class="comment-meta">
<a href="http://www.yalewoo.com/cpp_sublimelinter.html#comment-97"><time datetime="2015-05-20T15:07:42+00:00">2015年5月20日 15:07</time></a>
<span class="reply">
<a rel='nofollow' class='comment-reply-link' href='http://www.yalewoo.com/cpp_sublimelinter.html?replytocom=97#respond' onclick='return addComment.moveForm( "comment-97", "97", "respond", "1500" )' aria-label='回复给ScratchingBear'>回复</a> </span>
</div>
</div>
</div>
<ul class="children">
<li class="comment byuser comment-author-yalewoo bypostauthor odd alt depth-2" id="li-comment-98">
<div id="comment-98" class="comment-one">
<div class="comment-author-avatar">
<img alt='' data-original="http://0.gravatar.com/avatar/62e19307736b9ce9073ce4c5f76e5407?s=64&d=identicon&r=g" src="http://www.yalewoo.com/wp-content/themes/YLW3_lite/img/loading.gif" srcset='http://0.gravatar.com/avatar/62e19307736b9ce9073ce4c5f76e5407?s=128&d=identicon&r=g 2x' class='avatar avatar-64 photo' height='64' width='64' />
<noscript><img alt='' src='http://0.gravatar.com/avatar/62e19307736b9ce9073ce4c5f76e5407?s=64&d=identicon&r=g' srcset='http://0.gravatar.com/avatar/62e19307736b9ce9073ce4c5f76e5407?s=128&d=identicon&r=g 2x' class='avatar avatar-64 photo' height='64' width='64' /></noscript> </div>
<div class="comment-body">
<div class="comment-author-name">
<a href='http://www.yalewoo.com/' target='_blank'>yalewoo</a> <span class="comment-author-is-bloger"> 作者</span> </div>
<p>sublime里面要安装的插件有两个,SublimeLinter和SublimeLinter-cppcheck 。如果没有安装第二个,打开c/c++文件就没有Linter的选项。安装后要重启sublime</p>
<div class="comment-meta">
<a href="http://www.yalewoo.com/cpp_sublimelinter.html#comment-98"><time datetime="2015-05-21T12:56:42+00:00">2015年5月21日 12:56</time></a>
<span class="reply">
<a rel='nofollow' class='comment-reply-link' href='http://www.yalewoo.com/cpp_sublimelinter.html?replytocom=98#respond' onclick='return addComment.moveForm( "comment-98", "98", "respond", "1500" )' aria-label='回复给yalewoo'>回复</a> </span>
</div>
</div>
</div>
</li><!-- #comment-## -->
</ul><!-- .children -->
</li><!-- #comment-## -->
<li class="comment even thread-even depth-1" id="li-comment-145">
<div id="comment-145" class="comment-one">
<div class="comment-author-avatar">
<img alt='' data-original="http://2.gravatar.com/avatar/?s=64&d=identicon&r=g" src="http://www.yalewoo.com/wp-content/themes/YLW3_lite/img/loading.gif" srcset='http://1.gravatar.com/avatar/?s=128&d=identicon&r=g 2x' class='avatar avatar-64 photo avatar-default' height='64' width='64' />
<noscript><img alt='' src='http://2.gravatar.com/avatar/?s=64&d=identicon&r=g' srcset='http://1.gravatar.com/avatar/?s=128&d=identicon&r=g 2x' class='avatar avatar-64 photo avatar-default' height='64' width='64' /></noscript> </div>
<div class="comment-body">
<div class="comment-author-name">
<a href='http://t.qq.com/huangjie7617' target='_blank'>黄杰</a> </div>
<p>lz你好我在sub3上面的很多插件都无法使用,选项都是灰色的,插件的设置都为空,是版本的问题吗,lz什么版本</p>
<div class="comment-meta">
<a href="http://www.yalewoo.com/cpp_sublimelinter.html#comment-145"><time datetime="2015-11-07T14:11:27+00:00">2015年11月7日 14:11</time></a>
<span class="reply">
<a rel='nofollow' class='comment-reply-link' href='http://www.yalewoo.com/cpp_sublimelinter.html?replytocom=145#respond' onclick='return addComment.moveForm( "comment-145", "145", "respond", "1500" )' aria-label='回复给黄杰'>回复</a> </span>
</div>
</div>
</div>
<ul class="children">
<li class="comment byuser comment-author-yalewoo bypostauthor odd alt depth-2" id="li-comment-147">
<div id="comment-147" class="comment-one">
<div class="comment-author-avatar">
<img alt='' data-original="http://0.gravatar.com/avatar/62e19307736b9ce9073ce4c5f76e5407?s=64&d=identicon&r=g" src="http://www.yalewoo.com/wp-content/themes/YLW3_lite/img/loading.gif" srcset='http://0.gravatar.com/avatar/62e19307736b9ce9073ce4c5f76e5407?s=128&d=identicon&r=g 2x' class='avatar avatar-64 photo' height='64' width='64' />
<noscript><img alt='' src='http://0.gravatar.com/avatar/62e19307736b9ce9073ce4c5f76e5407?s=64&d=identicon&r=g' srcset='http://0.gravatar.com/avatar/62e19307736b9ce9073ce4c5f76e5407?s=128&d=identicon&r=g 2x' class='avatar avatar-64 photo' height='64' width='64' /></noscript> </div>
<div class="comment-body">
<div class="comment-author-name">
<a href='http://www.yalewoo.com/' target='_blank'>yalewoo</a> <span class="comment-author-is-bloger"> 作者</span> </div>
<p>我的是3083版本 应该不是版本的问题。。可以试试重装Package control</p>
<div class="comment-meta">
<a href="http://www.yalewoo.com/cpp_sublimelinter.html#comment-147"><time datetime="2015-11-07T16:31:46+00:00">2015年11月7日 16:31</time></a>
<span class="reply">
<a rel='nofollow' class='comment-reply-link' href='http://www.yalewoo.com/cpp_sublimelinter.html?replytocom=147#respond' onclick='return addComment.moveForm( "comment-147", "147", "respond", "1500" )' aria-label='回复给yalewoo'>回复</a> </span>
</div>
</div>
</div>
</li><!-- #comment-## -->
</ul><!-- .children -->
</li><!-- #comment-## -->
</ol><!-- .comment-list -->
<div id="respond" class="comment-respond">
<h3 id="reply-title" class="comment-reply-title">我要评论 <small><a rel="nofollow" id="cancel-comment-reply-link" href="/cpp_sublimelinter.html#respond" style="display:none;">取消回复</a></small></h3> <form action="http://www.yalewoo.com/wp-comments-post.php" method="post" id="commentform" class="comment-form">
<p class="comment-form-comment"><textarea id="comment" name="comment" cols="45" rows="8" maxlength="65525" aria-required="true" required="required"></textarea></p>
<script type="text/javascript" src="http://www.yalewoo.com/wp-content/themes/YLW3_lite/js/show_smilies.js"></script>
<div class="ylw_comment_toolbar">
<a class="button-insert-smilies" id="button-insert-smilies" title="插入表情" onClick="show_smilies();"></a>
</div>
<div class="ylw_smilies_box_wrapper">
<div class="ylw_smilies_box" id="ylw_smilies_box">
</div>
</div><div class="comment-name-email-url"><p class="comment-form-author"><label for="author">姓名</label><input id="author" name="author" type="text" value="" size="30" /> </p>
<p class="comment-form-email"><label for="email">邮箱</label><input id="email" name="email" type="text" value="" size="30" /> </p>
<p class="comment-form-url"><label for="url">网址</label><input id="url" name="url" type="text" value="" size="30" /></p></div><div class='comment_yzm'>验证码*: 8 + 2 = <input type='text' name='sum' class='math_textfield' required='required' value='' size='25' tabindex='4'><input type='hidden' name='num1' value='8'><input type='hidden' name='num2' value='2'></div><div class="comment-right"><div class="comment-submit-button">
<p class="form-submit"><input name="submit" type="submit" id="submit" class="submit" value="发表评论" /> <input type='hidden' name='comment_post_ID' value='1500' id='comment_post_ID' />
<input type='hidden' name='comment_parent' id='comment_parent' value='0' />
</p></div><div class="ylw_comment_notifyme"><input type="checkbox" name="comment_mail_notify" id="comment_mail_notify" value="comment_mail_notify" checked="checked" style="margin-left:20px;" /><label for="comment_mail_notify">有人回复时邮件通知我</label></div></div></div><div class="clear"></div> </form>
</div><!-- #respond -->
</div><!-- .comments-area -->
</div>
</section>
</div>
<footer id="footer">
Copyright © <a title="雅乐网" href="http://www.yalewoo.com">雅乐网</a> /<a title="自豪地采用WordPress" href="https://cn.wordpress.org" target="_blank">WordPress</a> / <a title="YLW3.0主题" href="http://www.yalewoo.com/ylw3.html" target="_blank">YLW3.0</a> / <a title="老薛主机" href="https://my.laoxuehost.net/aff.php?aff=2518" target="_blank">老薛主机</a> / <a title="七牛云存储" href="https://portal.qiniu.com/signup?code=3li1yeb2ph1ea" target="_black">七牛云存储</a>
<div id="footer_menu">
<div class="menu-%e5%ba%95%e9%83%a8-container"><ul id="menu-%e5%ba%95%e9%83%a8" class="menu"><li id="menu-item-655" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-655"><a target="_blank" href="http://www.yalewoo.com/sitemap.xml">站点地图</a></li>
</ul></div> </div>
<div id="cnzztongji">
<script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");document.write(unescape("%3Cspan id='cnzz_stat_icon_1252889774'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s5.cnzz.com/stat.php%3Fid%3D1252889774%26show%3Dpic1' type='text/javascript'%3E%3C/script%3E"));</script>
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "//hm.baidu.com/hm.js?e937132d7f7e86dfb5300ce1ab2c25f7";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
</div>
</footer>
<script type="text/javascript" src="http://www.yalewoo.com/wp-content/themes/YLW3_lite/js/backtop.js"></script>
<script type='text/javascript' src='http://www.yalewoo.com/wp-includes/js/comment-reply.min.js?ver=4.7.7'></script>
</body>
</html>
<!-- Dynamic page generated in 0.789 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2017-11-06 18:59:06 -->
<!-- Compression = gzip -->
<!-- super cache -->