Linux环境下warning: no newline at end of file
2014-03-14 11:50
501 查看
今天在Windows下VS2012写了一个程序, 然后放在Linux系统下进行编译。Linux下使用的编译器是CC,结果,一编译出现了很多诸如下面的警告信息,似乎每一个.cpp和.h文件都有。
Item.h:53:7: warning: no newline at end of
file
原因:
产生这种警告的原因在于源文件的最后一行没有回车符。
解决办法:
在每个源文件(包括.cpp和.h)的最后一行补一个回车, 然后保存,
重新编译,不再有警告,全部顺利编译成功。
Item.h:53:7: warning: no newline at end of
file
原因:
产生这种警告的原因在于源文件的最后一行没有回车符。
解决办法:
在每个源文件(包括.cpp和.h)的最后一行补一个回车, 然后保存,
重新编译,不再有警告,全部顺利编译成功。
相关文章推荐
- linux ubuntu 如何解决warning: no newline at end of file?
- warning no newline at the end of file
- main.c :10:2 warning: no newline at the end of file
- warning: no newline at end of file
- warning no newline at the end of file
- 由“warning: no newline at end of file”引申而来
- warning: no newline at the end of file
- warning no newline at the end of file
- warning: no newline at end of file
- Linux: gcc warning warning: no newline at end of file
- warning: no newline at the end of file
- warning: no newline at end of file的原因
- C语言-何消除 warning no newline at the end of file
- Warning: no newline at end of file
- 关于GCC的warning: no newline at end of file警告的原因
- warning no newline at the end of file
- warning: no newline at end of file
- warning: no newline at end of file
- warning no newline at the end of file
- 如何解决warning: no newline at end of file