转载地址:http://stackoverflow.com/questions/15466613/lowercase-windows-h-and-uppercase-windows-h-difference
google得知:
accepted | There is no difference, and nor could there be as file names on windows (NTFS) are case insensitive. Actually, according to Filenames are Case Sensitive on NTFS Volumes NTFS has two different modes where one is case sensitive:
|
The file systems on Windows are case insensitve so either one will work when compiling on Windows. However, if you were to compile on Linux using the MinGW cross compiler for example, the case would matter.
The MinGW windows.h
header always seems to be lower case.
The Windows.h
file provided with Microsoft's tools have used a variety of cases.
old VC++ installations (VC++98 and earlier) appear to install
WINDOWS.H
- all capsnewer VC++ installations and Windows SDKs seem to use
Windows.h
some mobile device SDKs (PocketPC or Windows mobile) use
windows.h
- all lowercase.
Since windows.h
will always work on both Windows and a Linux cross compile, I'd use #include <windows.h>
if I ever thought about it. Which I can't recall doing until answering this.
I wouldn't worry about this too much. Even if the capitalized form finds its way onto a Linux MinGW build, an easy (if maybe annoying) fix is to create a Windows.h
file that just turns around and includeswindows.h
.
简单来说:
主要是文件操作系统问题,如果文件操作系统对大小写不敏感(eg:Windows),则这两者无区别。
如果文件操作系统对大小写敏感(eg:Linux),则两者就有区别了。
对Windows系统来说,两者没有区别。大写的Windows.h主要用在SDK编程上。
对Linux系统来说,两者就有区别的。Linux上用小写的windows.h。
也就是说,在任何情况下,用小写的windows.h应该都是没有问题的。
以上纯属个人观点。
转载于:https://blog.51cto.com/whatever957/1629325