简体   繁体   English

当包含.h文件时,Eclipse System-Workbench(Win 10 v4.6.3)忽略大小写

[英]Eclipse System-Workbench (Win 10 v4.6.3) ignores case when including .h files

In reference to SO question 关于SO 问题
My friend's code gets compiled on his Windows PC but it doesn't for my Linux PC. 我朋友的代码在他的Windows PC上编译,但不适用于我的Linux PC。
I'm using Eclipse Luna (4.4.2) , System Workbench for STM32-OpenOCD Version: 1.13.2.201703061529 , arm-none-eabi-gcc version 4.9.3 我正在使用Eclipse Luna (4.4.2) ,STM32-OpenOCD Version: 1.13.2.201703061529 System Workbench Version: 1.13.2.201703061529 ,arm-none-eabi-gcc版本4.9.3
And he's using Eclipse v4.6.3 , and SW-STM32 v1.15.0.201708311556 , arm-none-eabi-gcc v4.7.2. 并且他正在使用Eclipse v4.6.3和SW-STM32 v1.15.0.201708311556 ,arm-none-eabi-gcc v4.7.2。

Forget about versions, a C code is case sensitive to includes and his compiler just outright ignores that! 忘记版本,C代码对include区分大小写,而他的编译器则完全忽略了这一点!

Anyone have any clue if a flag has been set along with his compiler? 任何人都知道是否在编译器中设置了标志吗? Shouldn't we remove this to be on par with the C standard? 我们不应该删除它以使其与C标准相提并论吗?

The reason for this as stated by @Gerhardh is the difference in how the OS searches for files. @Gerhardh指出的原因是操作系统搜索文件的方式不同。 Windows is not case sensitive whereas Linux is. Windows不区分大小写,而Linux区分大小写。 Sticking to a coding standard is the best option. 坚持编码标准是最好的选择。

Thank you Gerhardh 谢谢格哈德

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

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