linux 上的格式放入windows 上报错

简介

vs 上一直说使用unicode编码格式

解决方案

在makefile中添加这两项

format_incode :
	find . -regex '.*.(cpp|hpp|cc|cxx)' -exec enca -L zh_CN -x unicode {} ;
format_decode :
	find . -regex '.*.(cpp|hpp|cc|cxx)' -exec enca -L zh_CN -x utf-8 {} ;

一个是编码一个是解码,很好用的。

TIPS

makefile 遇到错误,遇到了 NUL 字符;忽略行的剩余部分
只要改变文件编码即可
可以用linux 的命令查看文件格式
file Makefile即可,然后用enca改变文件格式即可。

Hope is a good thing,maybe the best of things,and no good thing ever dies.----------- Andy Dufresne
原文地址:https://www.cnblogs.com/eat-too-much/p/14047451.html