解析:
(1)Clean Project:删除编译项目生成的文件。 (2)Build Project:编译项目。
说明:自己认为Clean Project就相当于make clean,而Build Project就相当于make all。
2. Ctrl+S光标回到该行开头问题
解析:
Window—>Preferences—>C/C++—>Editor—>Save Actions—>勾掉Remove trailing whitespace即可。
3. 末行Ctrl+S显示新行问题
解析:
Window—>Preferences—>C/C++—>Editor—>Save Actions—>勾掉Ensure newline at the end of file即可。
4. CMake [1]
解析:CMake是用来makefile的一个工具,读入所有源文件之后,自动生成makefile。make和cmake区别:make -> makefile -> cmake -> cmakelists.txt。
5. 禁止C4819警告
解析:
(1)警告意思:在该文件中有一个或多个字符不是Unicode字符,要求把这个字符变成Unicode字符。
(2)解决办法:项目 -> 属性 -> 配置属性 -> C/C++ -> 高级 -> 禁用特定警告 -> 4819。
6. Windows (CR LF)
错误:There are inconsistent line endings in the ‘Assets/TestCS.cs’ script. Some are Mac OS X (UNIX) and some are Windows.This might lead to incorrect line numbers in stacktraces and compiler errors. Many text editors can fix this using Convert Line Endings menu commands.
解析:文件 -> 高级保存选项 -> 行尾 -> Windows (CR LF)。
7. 警用C4267警告
解析:
(1)警告意思:“初始化”: 从“size_t”转换“XXX”,可能丢失数据。在x64中,size_t为64 位,而unsigned int为32位。
(2)解决办法:项目 -> 属性 -> 配置属性 -> C/C++ -> 常规 -> 检查64位可移植问题 -> 否。
参考文献:
[1] Windows下CMake使用图文手册:http://www.cnblogs.com/cuiocean/p/5460419.html
