It's possible that AAA.pch does actually depend on the current directory or current source file directory. Does aaa.h contain any #includes?Can you show the full command lines for the different compile steps? Are there any differences besides the pch options and filenames?