[Insight-developers] VS linking error

Brad King brad.king at kitware.com
Thu Jun 9 15:07:13 EDT 2011


On 6/9/2011 2:42 PM, Bradley Lowekamp wrote:
> Looking at the following file path:
> 
> '..\..\..\..\..\..\..\..\..\Users\blowekamp\Documents\Source\ITK\Modules\ThirdParty\GDCM\src\gdcm\Source\DataStructureAndEncodingDefinition\gdcmUNExplicitImplicitDataElement.cxx'
> 
> I can't help but wonder if we should be using absolute paths and not
> relative. I wonder if there is a way to do that with CMake?

CMake has a check before generating relative paths to ensure that no
sequence of "../" leaves the top build directory.  IIRC in this case it
actually is generating full paths.  At some point VS's build process
converts it to a relative path.  Then later it appends that relative
path to the current working directory such that the total exceeds its
maximum path length buffer even though the absolute path would not.  I
do not know if there is much CMake can do to work around this except
somehow detecting when it will happen and asking the user to choose a
shorter path.

-Brad K


More information about the Insight-developers mailing list