[Insight-users] Error in compilation of WatershedImageFilter in a standalone project

Feng Ma mafeng at hotmail . com
Wed, 17 Sep 2003 15:39:31 -0400


Hi, Luis:

  This is an interesting situation.

  I did the following test: copy over 
itkWatershedMiniPipelineProgressCommand.h  and cxx files into my wrapper 
directory. Build the ITKWrapLab  library. Now libITKWrapLab.a also has 
itkWatershedMiniPipelineProgressCommand.o

  Then I do make. Everything is fine.

  So it is true that itkWatershedMiniPipelineProgressCommand.o is not 
properly linked to my project. How does that happen? This is the link line 
from Makefile generated:

    c++        -ftemplate-depth-50 -fPIC  $(fmatest_SRC_OBJS)   -o ./fmatest 
-rdynamic -L/r2/fma/ITK/lib/InsightToolkit -L. -lITKCommon -lITKIO 
-lITKNumerics -lITKAlgorithms -lITKBasicFilters -lITKWrapLib -litkpng 
-litkzlib -lITKMetaIO -lITKDICOMParser -lITKEXPAT -lITKVHDIO -lITKNumerics 
-lITKCommon -litkvnl_algo -litkvnl -litknetlib -lm -litksys -lpthread -ldl 
-lm -Wl,-rpath,/r2/fma/ITK/lib/InsightToolkit:.


  This is the contents of the two libraries (ITKWrapLab and ITKAlgorithms)

    fma at ws-fma:/r2net/r2/fma/ITK/lib/InsightToolkit 260 % ar tf 
libITKWrapLib.a
    itkWatershed3DSeg.o
    itkWatershedMiniPipelineProgressCommand.o

    fma at ws-fma:/r2net/r2/fma/ITK/lib/InsightToolkit 261 % ar tf 
libITKAlgorithms.a
    itkWatershedMiniPipelineProgressCommand.o
    itkBioGene.o
    itkBioGeneNetwork.o

  The question is that both libraries are in the same search path. However, 
one is linked and other is not linked.

  Any clue?

  Thanks a lot.

-Feng

_________________________________________________________________
Get a FREE computer virus scan online from McAfee. 
http://clinic . mcafee . com/clinic/ibuy/campaign . asp?cid=3963