My problem, in a nutshell...
I just added an entire folder of existing source, using the "Add existing files" dialog. Everything in that folder/filter builds, EXCEPT for one particular file. I can open the file through the solution explorer and view it--the IDE knows the file is there. When I try to build, however, I get this error (I slightly modified the filenames and paths just to be safe with respect to my employers disclosure policies):
1>c1xx : fatal error C1083: Cannot open source file: '..\..\PresentationActivity\XXX_Presentation_Activity\XXX_Presentation_Activity.cpp': No such file or directory
The problem occurs in each of a series of similar folders/filters... everything builds, except for the file with the similar name:
1>c1xx : fatal error C1083: Cannot open source file: '..\..\PresentationActivity\YYY_Presentation_Activity\YYY_Presentation_Activity.cpp': No such file or directory
1>c1xx : fatal error C1083: Cannot open source file: '..\..\PresentationActivity\ZZZ_Presentation_Activity\ZZZ_Presentation_Activity.cpp': No such file or directory
Again... each of these files is present in solution explorer, and can be opened and edited. The files are there.
Any idea what might be causing these?
OK... it has something to do with the length of the filename... if the source filename is longer than 30 characters, it doesn't build. Is this by design?
Earlier, I shortened the filenames... in reality, the source file I'm trying to build is more along the lines of:
It will build if I shorten that to:
But nothing longer.
It is not as arbitrary as you think. Look at the _MAX_PATH and _MAX_DIR symbolic names (macros or whatever). If you search the headers then you can see what their actual values are; that might explain what is happening. If so, then probably the VS documentation explains what to do; perhaps you need to use UNC names.