[CMake] CMake, Visual studio 2005 and long relative path

Andrew Maclean andrew.amaclean at gmail.com
Mon Jan 12 00:15:01 EST 2009


In the documentation (see the link below) it says:

"For example, the maximum path on drive D is "D:\<some 256 character
path string><NUL>" where "<NUL>" represents the invisible terminating
null character for the current system codepage. (The characters < >
are used here for visual clarity and cannot be part of a valid path
string.)"

Reading on further:
"The Windows API has many functions that also have Unicode versions to
permit an extended-length path for a maximum total path length of
32,767 characters. This type of path is composed of components
separated by backslashes, each up to the value returned in the
lpMaximumComponentLength parameter of the GetVolumeInformation
function. To specify an extended-length path, use the "\\?\" prefix.
For example, "\\?\D:\<very long path>". (The characters < > are used
here for visual clarity and cannot be part of a valid path string.)"

However I have never used this.


We regularly run into this problem.


Andrew


On Mon, Jan 12, 2009 at 1:47 AM, Andreas Pakulat <apaku at gmx.de> wrote:
> On 10.01.09 16:20:43, Armin Berres wrote:
>> On Thu, 08 Jan 09 14:56, Julien Michel wrote:
>> > Dear CMake users and developpers,
>> >
>> > My project is using cmake and I am trying to build it on Visual Studio
>> > 2005. The configuration process is successful, but when trying to
>> > compile, I have a long bunch of fatal C1083 error :
>> >
>> > fatal error C1083: impossible to open source file:
>> > '../../../../../../../../../../Path-to-the-source-file' no such file or
>> > directory.
>> >
>> > But when manually testing, the file is where visual is looking for it.
>> >
>> > After some more testing, it appears that windows does not recognize
>> > files if there are too many '../' in the path (even if the total path
>> > length does not exceed 150 characters).
>> >
>> > Is this a known limitation of visual, or due to a cmake recent update ?
>> > I did not meet this problem before, and my project did not change that
>> > much ...
>> >
>> > Any clue of what is going wrong ?
>>
>> See <http://msdn.microsoft.com/en-us/library/aa365247.aspx>. The max
>> length of a path in windows is 260 characters.
>
> Thats wrong, the maximum length of a pathname component is 255 characters
> (that is the part between two \). The maximum length for a path is much
> more (yet still less than on unix, IIRC).
>
> Andreas
>
> --
> Write yourself a threatening letter and pen a defiant reply.
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>



-- 
___________________________________________
Andrew J. P. Maclean
Centre for Autonomous Systems
The Rose Street Building J04
The University of Sydney  2006  NSW
AUSTRALIA
Ph: +61 2 9351 3283
Fax: +61 2 9351 7474
URL: http://www.acfr.usyd.edu.au/
___________________________________________


More information about the CMake mailing list