简体   繁体   English

sublime 不突出显示 C++ 文件

[英]sublime is not highlighting c++ files

I set up sublime and my text is not showing up colorful or anything highlighted if a library, etc. I am doing a simple hello world and I am getting the error:我设置了 sublime 并且我的文本没有显示彩色或任何突出显示的内容,如果是图书馆等。我正在做一个简单的 hello world 并且我收到错误:

clang: error: no input files
[Finished in 0.0s with exit code 1]

What does this mean and how do I fix it?这是什么意思,我该如何解决?

Ensure your files are saved and have the appropriate file extensions:确保您的文件已保存并具有适当的文件扩展名:
C/C++ common file extensions: C/C++ 常见文件扩展名:
.c , .cpp , .cc , .h , .hpp .c.cpp.cc.h.hpp

Also check that you have syntax highlighting enabled:还要检查您是否启用了语法突出显示:

ctrl + shift + P ctrl + shift + P

Set Syntax: C++11

There is not enough information on your build system from within sublime. sublime 中没有关于您的构建系统的足够信息。
Check Tools->Build System and make the necessary adjustments there.检查Tools->Build System并在那里进行必要的调整。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM