不区分大小写的#include语句恐怖... [英] The case insensitive #include statement horror...

查看:132
本文介绍了不区分大小写的#include语句恐怖...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好


请原谅我,如果这是错误的NG,因为这是一个编译器

特定的C ++ - 问题:


我正在为多个平台管理一个庞大的构建系统(Win *,Linux,

MacOSX)。我们的大多数程序员都在Windows上工作,似乎无法在#include中学习大写和小写字符之间的区别。

所以大部分时间都适用于Windows但是对其他人失败了。虽然

他们在项目失败时收到邮件,但错误要么得不到修复,要么在每次更改后重新出现这些错误......这真是令人讨厌_! -

这里的任何人都知道一个开关或技巧,使#include-statements中的Microsoft编译器(VC6和

up)区分大小写,并在错误时抛出错误案件?


感谢你不要拍我

问候

Stephan Kuhagen

解决方案



Stephan Kuhagen napsal:


Hello


请原谅我,如果这是错误的NG,因为这是一个编译器

特定的C ++ - 问题:


我'为多个平台管理庞大的构建系统(Win *,Linux,

MacOSX)。我们的大多数程序员都在Windows上工作,似乎无法在#include中学习大写和小写字符之间的区别。

所以大部分时间都适用于Windows但是对其他人失败了。虽然

他们在项目失败时收到邮件,但错误要么得不到修复,要么在每次更改后重新出现这些错误......这真是令人讨厌_! -

这里的任何人都知道一个开关或技巧,使#include-statements中的Microsoft编译器(VC6和

up)区分大小写,并在错误时抛出错误案件?


感谢你不要拍我

问候

Stephan Kuhagen



嗨。我也在处理同样的问题。但是这不是问题,而是b $ b编译器,它是文件系统的问题,因为在FAT或NTFS上都是

总是文件,只有大写/小写字母不同,对待as

相同的文件。您可以在Windows上使用gcc尝试它,有相同的

问题。


Ondra Holub写道:


嗨。我也在处理同样的问题。但是这不是问题,而是b $ b编译器,它是文件系统的问题,因为在FAT或NTFS上都是

总是文件,只有大写/小写字母不同,对待as

相同的文件。您可以在Windows上使用gcc进行尝试,有相同的

问题。



是的,我知道。但是由于Windows能够在资源管理器中显示正确的文件名

,甚至在控制台中显示dir,我想(绝望地希望... b $ b希望...)是MS编译器中的一个开关或一个不起眼的pragma来

让他们检查拼写...


问候

Stephan




Stephan Kuhagen napsal:


Ondra Holub写道:


嗨。我也在处理同样的问题。但是这不是问题,而是b $ b编译器,它是文件系统的问题,因为在FAT或NTFS上都是

总是文件,只有大写/小写字母不同,对待as

相同的文件。您可以在Windows上使用gcc进行尝试,有相同的

问题。



是的,我知道。但是由于Windows能够在资源管理器中显示正确的文件名

,甚至在控制台中显示dir,我想(绝望地希望... b $ b希望...)是MS编译器中的一个开关或一个不起眼的pragma来

让他们检查拼写...


问候

Stephan



我会有一个(模糊的)解决方案。我不知道,你正在使用哪个版本的

系统。一些版本控制系统允许在签入新版本的源代码时运行一些脚本

。这样的脚本可能会对签入的文件执行一些

检查或修改(添加更改日志,

等)。我认为在ClearCase中可以通过脚本拒绝签到。

所以你可以编写自己的脚本,检查所有#includes

的有效性。


正如我写的那样,它很模糊,但它应该有效,而且这个脚本不应该像b $ b那样复杂。


Hello

Please forgive me, if this is the wrong NG, since this is a compiler
specific C++-Question:

I''m managing a huge build system for multiple platforms (Win*, Linux,
MacOSX). Most of our programmers work on Windows and seem to be unable to
learn the difference between upper and lower case characters in #include.
So most time the thing works on Windows, but fails on the others. Although
they get mails when a project fails, the errors either do not get fixed or
they re-appear after every change... This is _really annoying_ ! - Does
anyone here know a switch or trick to make the Microsoft-Compilers (VC6 and
up) case-sensitive in #include-statements and throw an error on wrong case?

"Thanks for not shooting me"
Regards
Stephan Kuhagen

解决方案


Stephan Kuhagen napsal:

Hello

Please forgive me, if this is the wrong NG, since this is a compiler
specific C++-Question:

I''m managing a huge build system for multiple platforms (Win*, Linux,
MacOSX). Most of our programmers work on Windows and seem to be unable to
learn the difference between upper and lower case characters in #include.
So most time the thing works on Windows, but fails on the others. Although
they get mails when a project fails, the errors either do not get fixed or
they re-appear after every change... This is _really annoying_ ! - Does
anyone here know a switch or trick to make the Microsoft-Compilers (VC6 and
up) case-sensitive in #include-statements and throw an error on wrong case?

"Thanks for not shooting me"
Regards
Stephan Kuhagen

Hi. I was dealing with the same problem too. But it is not problem of
compiler, it is problem of filesystem, because on FAT or NTFS are
always files, which differ only in upper/lower case letters, treated as
same files. You can try it with gcc on Windows, there is the same
problem.


Ondra Holub wrote:

Hi. I was dealing with the same problem too. But it is not problem of
compiler, it is problem of filesystem, because on FAT or NTFS are
always files, which differ only in upper/lower case letters, treated as
same files. You can try it with gcc on Windows, there is the same
problem.

Yes, I know. But since Windows is able to show the filenames in correct case
in the Explorer or even with dir in the console, I thought (desperately
hoped...) there may be a switch in the MS compilers or an obscure pragma to
make them check the spelling...

Regards
Stephan



Stephan Kuhagen napsal:

Ondra Holub wrote:

Hi. I was dealing with the same problem too. But it is not problem of
compiler, it is problem of filesystem, because on FAT or NTFS are
always files, which differ only in upper/lower case letters, treated as
same files. You can try it with gcc on Windows, there is the same
problem.


Yes, I know. But since Windows is able to show the filenames in correct case
in the Explorer or even with dir in the console, I thought (desperately
hoped...) there may be a switch in the MS compilers or an obscure pragma to
make them check the spelling...

Regards
Stephan

I would have one (obscure) solution. I do not know, which versioning
system are you using. Some of versioning systems allow run some script
during checking-in new version of source. Such script may perform some
checks or modifications of file being checked-in (adding change log,
etc.). I think in ClearCase is possible to decline check-in by script.
So you could write your own script, whcih checks all #includes for
validity.

As I wrote, it is obscure, but it should work and this script shouldn''t
be as complicated.


这篇关于不区分大小写的#include语句恐怖...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆