Original Post
Hi,
This has been a long-standing problem. I have a very large project, with dozens of source and header files at several levels in a directory structure.
For code clarity, in .cpp files, one should use "#include "../stdafx.h"", "#include "../../stdafx.h"", "#include "../../../stdafx.h"", etc. However, there is a problem with Visual Studio (I have 2010 Ultimate) that only allows "#include "stdafx.h"". You'll get an error:
warning C4627: '#include "../stdafx.h"': skipped when looking for precompiled header use
1> Add directive to 'stdafx.h' or rebuild precompiled header
The only technical posting I could find of any help was https://connect.micr...details/552449/. Previously, I have been working with workaround 1., which is beyond lame and is confusing. Compiling on other platforms makes that even more problematic. I would like to use workaround 2., but there are multiple levels of files in the directory structure, so just choosing a different name for the precompiled header file doesn't work. The posting was vague, and seemed to imply that it could be done separately for each directory level. I have no idea how to do that, or if that's even possible.
The posting is more than a year old, and nothing has come of it, so I assume it's been forgotten. It's a problem for me though.
Help?
Thanks,
G
This has been a long-standing problem. I have a very large project, with dozens of source and header files at several levels in a directory structure.
For code clarity, in .cpp files, one should use "#include "../stdafx.h"", "#include "../../stdafx.h"", "#include "../../../stdafx.h"", etc. However, there is a problem with Visual Studio (I have 2010 Ultimate) that only allows "#include "stdafx.h"". You'll get an error:
warning C4627: '#include "../stdafx.h"': skipped when looking for precompiled header use
1> Add directive to 'stdafx.h' or rebuild precompiled header
The only technical posting I could find of any help was https://connect.micr...details/552449/. Previously, I have been working with workaround 1., which is beyond lame and is confusing. Compiling on other platforms makes that even more problematic. I would like to use workaround 2., but there are multiple levels of files in the directory structure, so just choosing a different name for the precompiled header file doesn't work. The posting was vague, and seemed to imply that it could be done separately for each directory level. I have no idea how to do that, or if that's even possible.
The posting is more than a year old, and nothing has come of it, so I assume it's been forgotten. It's a problem for me though.
Help?
Thanks,
G