开发者

How can I make MinGW case-sensitive for included header file names

开发者 https://www.devze.com 2023-01-26 19:36 出处:网络
I want to make MinGW validate that the file names specified in #include directives are case correct.MinGW is case insensitive by default, probably because windows is case insensitive when it comes to

I want to make MinGW validate that the file names specified in #include directives are case correct. MinGW is case insensitive by default, probably because windows is case insensitive when it comes to filenames, 开发者_如何学Gobut I am working in a cross platform environment, and want to make sure that gcc doesn't complain under Linux when somebody specifies an include file with the wrong case.

I thought there might be a compile switch to force this, but haven't been able to find one. Any alternative suggestions would also be welcome.


I don't think MinGW has any such option. If you assume you're running on NTFS, at least, it would probably not be too difficult to code it up and contribute a patch. But the easiest solution by far is to simply remind people to be case correct, and fix the (hopefully rare!) instances where they slip up.

Sometimes the best solution is social, rather than technical.


I can not think about a direct solution, than writing some custom tool to check this :) Win32 subsystems generally imposes case insensivity, which makes it impossible to have a case-sensitive file request on Windows. At least on FATxx and NTFS file systems case-insensivity is imposed. I have not tried an NFS mounted file system. If it is an option, you could just have a try..

0

精彩评论

暂无评论...
验证码 换一张
取 消