Case sensitivity when linking

Chris Wright via Digitalmars-d digitalmars-d at puremagic.com
Sun Jan 29 19:29:21 PST 2017


I'd think the compiler would use the module name you supplied in the 
imported module as the canonical name. Are you not supplying module names? 
Are you changing them between incremental compilation steps? Is the 
compiler ignoring them?

If you don't supply a module name, the compiler could obtain the canonical 
file path with casing:

OSX:
http://stackoverflow.com/questions/370186/how-do-i-find-the-correct-case-
of-a-filename

  FSRef ref;
  FSPathMakeRef(path, &ref, NULL);
  FSRefMakePath(&ref, canonicalPath, MAX_PATH_LENGTH);
  return canonicalPath;

Windows:
http://stackoverflow.com/questions/2113822/python-getting-filename-case-as-
stored-in-windows

  return GetLongPathName(GetShortPathName(path));

Linux:

  (x) => x

Not sure if that would be better.


More information about the Digitalmars-d mailing list