[Insight-developers] Re: [Insight-users] Problems with Watershed class (fwd)

Joshua Cates cates at sci . utah . edu
Thu, 11 Jul 2002 10:01:37 -0600 (MDT)


Hi,

I've had this same problem on Linux with gcc.  Does anyone have any ideas
as to why this might be happening?  I have so far not been able to figure
it out.  It seems you cannot instantiate the WatershedImageFilter class
more than once in an application without getting these multiple symbol
errors when linking.

Josh.

______________________________
 Josh Cates
 School of Computer Science
 University of Utah
 Email: cates@sci.utah.edu
 Phone: (801) 587-7697
 URL:   www.cs.utk.edu/~cates


---------- Forwarded message ----------
Date: Tue, 2 Jul 2002 17:21:06 +0200
From: Samuel Rodr=EDguez Bescos <srodrigu@gbt.tfo.upm.es>
To: Nils Hanssen <hanssen@caesar.de>
Cc: insight-users@public.kitware.com
Subject: Re: [Insight-users] Problems with Watershed class

Thanks Nils for your help.

It runs OK now with warning instead errors.

Thank again,

Samuel


  ----- Original Message -----
  From: Nils Hanssen
  To: 'Samuel Rodr=EDguez Bescos' ; insight-users@public.kitware.com
  Sent: Tuesday, July 02, 2002 3:16 PM
  Subject: RE: [Insight-users] Problems with Watershed class


  Hi Samuel,

  I have exactly the same double symbols when linking my project with the W=
atershedImageFilter.
  It's not the clean way, but until the problem is discovered, you can turn=
 these errors into warnings by including the "/FORCE:MULTIPLE" in the linki=
ng options of MSVC.

  Regards,
  Nils
    -----Original Message-----
    From: insight-users-admin@public.kitware.com [mailto:insight-users-admi=
n@public.kitware.com]On Behalf Of Samuel Rodr=EDguez Bescos
    Sent: Tuesday, July 02, 2002 2:04 PM
    To: insight-users@public.kitware.com
    Subject: [Insight-users] Problems with Watershed class


    Hello everybody.

    I'm developing an example based in GaussianFilter example in order to s=
egmentate a PNG Image with the watershed algorithm. In the Base class I hav=
e defined a member of the WatershedImageFilter class and the estructure is =
the same of the Gaussian Filter example's.

    I have a linking problem the error lines are this:

    =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

    -------------------Configuration: Segmentation - Win32 Debug-----------=
---------
    Linking...
    liSegmentationConsole.obj : error LNK2005: "public: bool __thiscall itk=
::watershed::OneWayEquivalencyTable::Add(unsigned long,unsigned long)" (?Ad=
d@OneWayEquivalencyTable@watershed@itk@@QAE_NKK@Z) already defined in Segme=
ntation.obj
    liSegmentationConsole.obj : error LNK2005: "public: void __thiscall itk=
::watershed::OneWayEquivalencyTable::Flatten(void)" (?Flatten@OneWayEquival=
encyTable@watershed@itk@@QAEXXZ) already defined in Segmentation.obj
    liSegmentationConsole.obj : error LNK2005: "public: unsigned long __thi=
scall itk::watershed::OneWayEquivalencyTable::RecursiveLookup(unsigned int)=
const " (?RecursiveLookup@OneWayEquivalencyTable@watershed@itk@@QBEKI@Z) al=
ready defined in Segmentatio
    n.obj
    liSegmentationConsole.obj : error LNK2005: "protected: virtual void __t=
hiscall itk::watershed::OneWayEquivalencyTable::UpdateOutputInformation(voi=
d)" (?UpdateOutputInformation@OneWayEquivalencyTable@watershed@itk@@MAEXXZ)=
 already defined in Segmenta
    tion.obj
    liSegmentationConsole.obj : error LNK2005: "protected: virtual void __t=
hiscall itk::watershed::OneWayEquivalencyTable::PrintSelf(class std::basic_=
ostream<char,struct std::char_traits<char> > &,class itk::Indent)const " (?=
PrintSelf@OneWayEquivalencyT
    able@watershed@itk@@MBEXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@=
@VIndent@3@@Z) already defined in Segmentation.obj
    liSegmentationConsole.obj : error LNK2005: "public: bool __thiscall itk=
::watershed::EquivalencyTable::Add(unsigned long,unsigned long)" (?Add@Equi=
valencyTable@watershed@itk@@QAE_NKK@Z) already defined in Segmentation.obj
    liSegmentationConsole.obj : error LNK2005: "public: void __thiscall itk=
::watershed::EquivalencyTable::Flatten(void)" (?Flatten@EquivalencyTable@wa=
tershed@itk@@QAEXXZ) already defined in Segmentation.obj
    liSegmentationConsole.obj : error LNK2005: "public: unsigned long __thi=
scall itk::watershed::EquivalencyTable::RecursiveLookup(unsigned int)const =
" (?RecursiveLookup@EquivalencyTable@watershed@itk@@QBEKI@Z) already define=
d in Segmentation.obj
    liSegmentationConsole.obj : error LNK2005: "protected: virtual void __t=
hiscall itk::watershed::EquivalencyTable::UpdateOutputInformation(void)" (?=
UpdateOutputInformation@EquivalencyTable@watershed@itk@@MAEXXZ) already def=
ined in Segmentation.obj
    liSegmentationConsole.obj : error LNK2005: "protected: virtual void __t=
hiscall itk::watershed::EquivalencyTable::PrintSelf(class std::basic_ostrea=
m<char,struct std::char_traits<char> > &,class itk::Indent)const " (?PrintS=
elf@EquivalencyTable@watersh
    ed@itk@@MBEXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@VIndent@3@@=
Z) already defined in Segmentation.obj
    liSegmentationConsole.obj : error LNK2005: "public: virtual void __this=
call itk::WatershedMiniPipelineProgressCommand::Execute(class itk::Object *=
,class itk::EventObject const &)" (?Execute@WatershedMiniPipelineProgressCo=
mmand@itk@@UAEXPAVObject@2@A
    BVEventObject@2@@Z) already defined in Segmentation.obj
    liSegmentationConsole.obj : error LNK2005: "public: virtual void __this=
call itk::WatershedMiniPipelineProgressCommand::Execute(class itk::Object c=
onst *,class itk::EventObject const &)" (?Execute@WatershedMiniPipelineProg=
ressCommand@itk@@UAEXPBVObje
    ct@2@ABVEventObject@2@@Z) already defined in Segmentation.obj
    liSegmentationConsoleBase.obj : error LNK2005: "public: bool __thiscall=
 itk::watershed::OneWayEquivalencyTable::Add(unsigned long,unsigned long)" =
(?Add@OneWayEquivalencyTable@watershed@itk@@QAE_NKK@Z) already defined in S=
egmentation.obj
    liSegmentationConsoleBase.obj : error LNK2005: "public: void __thiscall=
 itk::watershed::OneWayEquivalencyTable::Flatten(void)" (?Flatten@OneWayEqu=
ivalencyTable@watershed@itk@@QAEXXZ) already defined in Segmentation.obj
    liSegmentationConsoleBase.obj : error LNK2005: "public: unsigned long _=
_thiscall itk::watershed::OneWayEquivalencyTable::RecursiveLookup(unsigned =
int)const " (?RecursiveLookup@OneWayEquivalencyTable@watershed@itk@@QBEKI@Z=
) already defined in Segment
    ation.obj
    liSegmentationConsoleBase.obj : error LNK2005: "protected: virtual void=
 __thiscall itk::watershed::OneWayEquivalencyTable::UpdateOutputInformation=
(void)" (?UpdateOutputInformation@OneWayEquivalencyTable@watershed@itk@@MAE=
XXZ) already defined in Segm
    entation.obj
    liSegmentationConsoleBase.obj : error LNK2005: "protected: virtual void=
 __thiscall itk::watershed::OneWayEquivalencyTable::PrintSelf(class std::ba=
sic_ostream<char,struct std::char_traits<char> > &,class itk::Indent)const =
" (?PrintSelf@OneWayEquivale
    ncyTable@watershed@itk@@MBEXAAV?$basic_ostream@DU?$char_traits@D@std@@@=
std@@VIndent@3@@Z) already defined in Segmentation.obj
    liSegmentationConsoleBase.obj : error LNK2005: "public: bool __thiscall=
 itk::watershed::EquivalencyTable::Add(unsigned long,unsigned long)" (?Add@=
EquivalencyTable@watershed@itk@@QAE_NKK@Z) already defined in Segmentation.=
obj
    liSegmentationConsoleBase.obj : error LNK2005: "public: void __thiscall=
 itk::watershed::EquivalencyTable::Flatten(void)" (?Flatten@EquivalencyTabl=
e@watershed@itk@@QAEXXZ) already defined in Segmentation.obj
    liSegmentationConsoleBase.obj : error LNK2005: "public: unsigned long _=
_thiscall itk::watershed::EquivalencyTable::RecursiveLookup(unsigned int)co=
nst " (?RecursiveLookup@EquivalencyTable@watershed@itk@@QBEKI@Z) already de=
fined in Segmentation.obj
    liSegmentationConsoleBase.obj : error LNK2005: "protected: virtual void=
 __thiscall itk::watershed::EquivalencyTable::UpdateOutputInformation(void)=
" (?UpdateOutputInformation@EquivalencyTable@watershed@itk@@MAEXXZ) already=
 defined in Segmentation.obj
    liSegmentationConsoleBase.obj : error LNK2005: "protected: virtual void=
 __thiscall itk::watershed::EquivalencyTable::PrintSelf(class std::basic_os=
tream<char,struct std::char_traits<char> > &,class itk::Indent)const " (?Pr=
intSelf@EquivalencyTable@wat
    ershed@itk@@MBEXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@VIndent=
@3@@Z) already defined in Segmentation.obj
    liSegmentationConsoleBase.obj : error LNK2005: "public: virtual void __=
thiscall itk::WatershedMiniPipelineProgressCommand::Execute(class itk::Obje=
ct *,class itk::EventObject const &)" (?Execute@WatershedMiniPipelineProgre=
ssCommand@itk@@UAEXPAVObject
    @2@ABVEventObject@2@@Z) already defined in Segmentation.obj
    liSegmentationConsoleBase.obj : error LNK2005: "public: virtual void __=
thiscall itk::WatershedMiniPipelineProgressCommand::Execute(class itk::Obje=
ct const *,class itk::EventObject const &)" (?Execute@WatershedMiniPipeline=
ProgressCommand@itk@@UAEXPBV
    Object@2@ABVEventObject@2@@Z) already defined in Segmentation.obj
    liSegmentationConsoleGUI.obj : error LNK2005: "public: bool __thiscall =
itk::watershed::OneWayEquivalencyTable::Add(unsigned long,unsigned long)" (=
?Add@OneWayEquivalencyTable@watershed@itk@@QAE_NKK@Z) already defined in Se=
gmentation.obj
    liSegmentationConsoleGUI.obj : error LNK2005: "public: void __thiscall =
itk::watershed::OneWayEquivalencyTable::Flatten(void)" (?Flatten@OneWayEqui=
valencyTable@watershed@itk@@QAEXXZ) already defined in Segmentation.obj
    liSegmentationConsoleGUI.obj : error LNK2005: "public: unsigned long __=
thiscall itk::watershed::OneWayEquivalencyTable::RecursiveLookup(unsigned i=
nt)const " (?RecursiveLookup@OneWayEquivalencyTable@watershed@itk@@QBEKI@Z)=
 already defined in Segmenta
    tion.obj
    liSegmentationConsoleGUI.obj : error LNK2005: "protected: virtual void =
__thiscall itk::watershed::OneWayEquivalencyTable::UpdateOutputInformation(=
void)" (?UpdateOutputInformation@OneWayEquivalencyTable@watershed@itk@@MAEX=
XZ) already defined in Segme
    ntation.obj
    liSegmentationConsoleGUI.obj : error LNK2005: "protected: virtual void =
__thiscall itk::watershed::OneWayEquivalencyTable::PrintSelf(class std::bas=
ic_ostream<char,struct std::char_traits<char> > &,class itk::Indent)const "=
 (?PrintSelf@OneWayEquivalen
    cyTable@watershed@itk@@MBEXAAV?$basic_ostream@DU?$char_traits@D@std@@@s=
td@@VIndent@3@@Z) already defined in Segmentation.obj
    liSegmentationConsoleGUI.obj : error LNK2005: "public: bool __thiscall =
itk::watershed::EquivalencyTable::Add(unsigned long,unsigned long)" (?Add@E=
quivalencyTable@watershed@itk@@QAE_NKK@Z) already defined in Segmentation.o=
bj
    liSegmentationConsoleGUI.obj : error LNK2005: "public: void __thiscall =
itk::watershed::EquivalencyTable::Flatten(void)" (?Flatten@EquivalencyTable=
@watershed@itk@@QAEXXZ) already defined in Segmentation.obj
    liSegmentationConsoleGUI.obj : error LNK2005: "public: unsigned long __=
thiscall itk::watershed::EquivalencyTable::RecursiveLookup(unsigned int)con=
st " (?RecursiveLookup@EquivalencyTable@watershed@itk@@QBEKI@Z) already def=
ined in Segmentation.obj
    liSegmentationConsoleGUI.obj : error LNK2005: "protected: virtual void =
__thiscall itk::watershed::EquivalencyTable::UpdateOutputInformation(void)"=
 (?UpdateOutputInformation@EquivalencyTable@watershed@itk@@MAEXXZ) already =
defined in Segmentation.obj
    liSegmentationConsoleGUI.obj : error LNK2005: "protected: virtual void =
__thiscall itk::watershed::EquivalencyTable::PrintSelf(class std::basic_ost=
ream<char,struct std::char_traits<char> > &,class itk::Indent)const " (?Pri=
ntSelf@EquivalencyTable@wate
    rshed@itk@@MBEXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@VIndent@=
3@@Z) already defined in Segmentation.obj
    liSegmentationConsoleGUI.obj : error LNK2005: "public: virtual void __t=
hiscall itk::WatershedMiniPipelineProgressCommand::Execute(class itk::Objec=
t *,class itk::EventObject const &)" (?Execute@WatershedMiniPipelineProgres=
sCommand@itk@@UAEXPAVObject@
    2@ABVEventObject@2@@Z) already defined in Segmentation.obj
    liSegmentationConsoleGUI.obj : error LNK2005: "public: virtual void __t=
hiscall itk::WatershedMiniPipelineProgressCommand::Execute(class itk::Objec=
t const *,class itk::EventObject const &)" (?Execute@WatershedMiniPipelineP=
rogressCommand@itk@@UAEXPBVO
    bject@2@ABVEventObject@2@@Z) already defined in Segmentation.obj
    LINK : warning LNK4098: defaultlib "MSVCRT" conflicts with use of other=
 libs; use /NODEFAULTLIB:library
    Debug/Segmentation.exe : fatal error LNK1169: one or more multiply defi=
ned symbols found
    Error executing link.exe.

    Segmentation.exe - 37 error(s), 1 warning(s)

    =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3DEND=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D

      I'm using the Beta Release and MSVC 6.0.

    Could anybody Know what is hapening and help me?

    Thanks in advance.

    Samuel