[vtkusers] Vtk Visual Studio 7 .NET Linking warning

Brad King brad.king at kitware.com
Fri Sep 17 10:38:18 EDT 2004


Nacho Larrabide wrote:

> Hi everybody,
> 
>    I send a message a few days ago on this subject but I've got no
>    response yet and I still couldn't solve this problem. I'm trying to
>    staticly link vtk on Visual Developer Studio 7 .NET and I get this
>    linking warnings and errors:
> 
>    vtktiff.lib(zlib.res) : fatal error LNK1241: resource file vtkzlib.lib(zlib.res) already specified
> 
>    [...]
>    vtkCommon.lib(vtkLargeInteger.obj) : warning LNK4006: "public: char __thiscall vtkLargeInteger::CastToChar(void)const " (?CastToChar at vtkLargeInteger@@QBEDXZ) already defined in vtkFiltering.lib(vtkLargeInteger.obj); second definition ignored
>    vtkCommon.lib(vtkLargeInteger.obj) : warning LNK4006: "public: short __thiscall vtkLargeInteger::CastToShort(void)const " (?CastToShort at vtkLargeInteger@@QBEFXZ) already defined in vtkFiltering.lib(vtkLargeInteger.obj); second definition ignored
>    vtkCommon.lib(vtkLargeInteger.obj) : warning LNK4006: "public: int __thiscall vtkLargeInteger::CastToInt(void)const " (?CastToInt at vtkLargeInteger@@QBEHXZ) already defined in vtkFiltering.lib(vtkLargeInteger.obj); second definition ignored
>    vtkCommon.lib(vtkLargeInteger.obj) : warning LNK4006: "public: class vtkLargeInteger & __thiscall vtkLargeInteger::operator/=(class vtkLargeInteger const &)" (??_0vtkLargeInteger@@QAEAAV0 at ABV0@@Z) already defined in vtkFiltering.lib(vtkLargeInteger.obj); second definition ignored
>    vtkCommon.lib(vtkLargeInteger.obj) : warning LNK4006: "public: class vtkLargeInteger __thiscall vtkLargeInteger::operator/(class vtkLargeInteger const &)const " (??KvtkLargeInteger@@QBE?AV0 at ABV0@@Z) already defined in vtkFiltering.lib(vtkLargeInteger.obj); second definition ignored
>    [...]
>    
>    This last warning I get it many times (like I'm including or
>    linking something too times).
>    May be I'm not configuring CMake properly or there is something to
>    do in VS 7 that I'm not doing. Do I have to set the static link on
>    CMake or in VStudio? How do I do this?.

The duplicate symbols are caused by the recent move of a bunch of 
classes from Common to Filtering.  If you create a fresh build with 
clean build tree this problem should go away.

-Brad




More information about the vtkusers mailing list