[Insight-developers] ITKv4 linking errors on Windows 7, MSVC 2010 Express

Xiangrong goddino at gmail.com
Tue May 10 00:08:31 EDT 2011


Dear all,

We (Alex) discovered that CMake 2.6.4 and 2.8.2 generated the right target
name (_name in ITK\CMake\ITKModuleMacros.cmake) but somehow did not write
the right target name in the .vcxproj files.
For e.g., in itkv3p_netlib.vcxproj, we have something like:
<TargetName
Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">itkv3p_netlib-4</TargetName>

When we upgraded to CMake 2.8.4, the problem was resolved.
 For e.g., in itkv3p_netlib.vcxproj, we now have:
<TargetName
Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">itkv3p_netlib-4.0</TargetName>

Regards,
Xiangrong, with Alex and Drew at SIgN.


On 6 May 2011 22:29, Alexandre GOUAILLARD <agouaillard at gmail.com> wrote:

> XR,
>
> we checked at today's itk dev meeting, and the problem should be
> solved by luis last patch on gerrit
> 9just now).
>
> please o ahead and try. Ask drew if you don t know how to get stuff from
> gerrit.
>
> alex.
>
>
> On Thu, May 5, 2011 at 9:24 PM, Xiangrong <goddino at gmail.com> wrote:
> > Hi,
> >
> > We were trying to build ITKv4 (with shared libs) on Windows 7, using MSVC
> > 2010 Express.
> >
> > We had 30 linking errors, as shown at:
> >
> > http://www.cdash.org/CDash/viewBuildError.php?onlydeltap&buildid=1088494
> >
> >
> >
> > For example, part of the error could look like this:
> >
> >
> >
> > fatal error LNK1104: cannot open file
> > '..\..\..\..\..\..\..\..\lib\Debug\itkv3p_netlib-4.0.lib'
> >
> [C:\src\ITK-cont-Build\Modules\ThirdParty\VNL\src\vxl\v3p\netlib\tests\netlib_lbfgs_example.vcxproj]
> >
> >
> >
> > The .lib files that could not be opened were supposed to be located in
> the
> > build tree at:
> >
> > lib/Debug
> >
> >
> >
> > There, we could find .lib files that were named almost the same, except
> that
> > they were without the trailing minor version number (“.0”).
> >
> > For e.g., instead of:
> >
> > itkv3p_netlib-4.0.lib
> >
> > we have:
> >
> > itkv3p_netlib-4.lib
> >
> >
> >
> > However, we do have the .pdb files with names like the expected .lib
> files
> > (i.e. with minor version number), e.g.:
> >
> > itkv3p_netlib-4.0.pdb
> >
> >
> >
> > Does anyone know how to resolve this problem?
> >
> >
> >
> > My own searching led me to this piece of code in the source tree:
> >
> > CMake/ITKModuleMacros.cmake
> >
> > From Line 117:
> >
> >
> >
> > macro(itk_module_target_name _name)
> >
> >   set_property(TARGET ${_name} PROPERTY VERSION 1)
> >
> >   set_property(TARGET ${_name} PROPERTY SOVERSION 1)
> >
> >   set_property(TARGET ${_name} PROPERTY OUTPUT_NAME
> > ${_name}-${ITK_VERSION_MAJOR}.${ITK_VERSION_MINOR} )
> >
> >
> >
> > I’m not sure if the above sets the platform independent part of library
> > names, but even if so, the code seemed correct.
> >
> >
> >
> > Thanks in advance.
> >
> >
> >
> > Regards,
> >
> > Xiangrong, with Alex and Drew at SIgN.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20110510/b987badf/attachment.htm>


More information about the Insight-developers mailing list