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

Alexandre GOUAILLARD agouaillard at gmail.com
Fri May 6 10:29:35 EDT 2011


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.


More information about the Insight-developers mailing list