Windows is case insensitive for files, but Linux is sensitive. It's really annoying when you develop on Linux and notice that the Windows team doesn't care about that.
Is there a way to force Visual Studio to be case sensitive on include files?
I've read about solutions doing a compilation after every commit in a Linux server and notifying the developer, but I can't do it. I need a way to force Visual Studio to be case sensitive so the Windows team can fix it while they're developing.
Case sensitivity doesn't depend on the compiler, but the underlying file system. So Linux may not be case sensitive, if the file system is remotely mounted on a Windows box, and vice versa. If you want to force case sensitivity on a Windows box, the only solution I know is to remote mount a file system on a Unix box.
Note that this shouldn't be a problem if you're developing on
Linux, then moving to Windows. It's the reverse which is
a problem. And the only real solution is to define and strictly
enforce a naming convention. You need it for the code anyway
(since C++ is case sensitive regardless). So if you have
a class FxTrade
, your coding conventions should insist that it
is Fx
, and not FX
; these convensions must be enforced in the
C++ code, or you'll go nuts having to look up each time which
one it is, and the same code review that enforces them in the
source should enforce them in the file names.
(And for what it's worth, it's a real pain to fix such an error
under Subversion, since svn FXTrade.cpp FxTrade.cpp
doesn't
work under Windows; you have to move it to some other name, then
commit, and then move it to the name you want.)