[Insight-users] Link error
Corinne Mattmann
mattmaco at ee.ethz.ch
Wed, 17 Mar 2004 10:58:07 -0700
Hi,
I use ITK and VTK. Lately, I decided to replace VTK version 4.2 with the
latest CVS version. When I recompiled all my projects, I got the link
errors attached at the end of this email. All the projects which do not
link anymore seem to have in common that they use VTK and include the
itkImageFileReader.h (see an example of the included *.h-files further
down). I use the latest CVS version of ITK (today).
Does somebody know what is wrong here?
Thanks very much,
Corinne
---------------------------------------
#include <iostream>
#include <sstream>
#include "itkWarpImageFilter.h"
#include "itkImageFileReader.h"
#include "itkImageToVTKImageFilter.h"
#include "itkVectorIndexSelectionCastImageFilter.h"
#include "itkRescaleIntensityImageFilter.h"
#include "itkHistogramMatchingImageFilter.h"
#include "itkFEM.h"
#include "itkFEMRegistrationFilter.h"
#include "vtkMarchingCubes.h"
#include "vtkPolyDataMapper.h"
#include "vtkRenderer.h"
#include "vtkRenderWindow.h"
#include "vtkRenderWindowInteractor.h"
#include "vtkPointData.h"
#include "vtkFloatArray.h"
#include "vtkCellArray.h"
#include "vtkPolyData.h"
#include "vtkMaskPolyData.h"
#include "vtkProperty.h"
----------------------------------------
Linking...
ITKDICOMParser.lib(DICOMParser.obj) : error LNK2005: "public: __thiscall
DICOMParser::DICOMParser(void)" (??0DICOMParser at at QAE at XZ) already defined
in vtkDICOMParser.lib(vtkDICOMParser.dll)
ITKDICOMParser.lib(DICOMParser.obj) : error LNK2005: "public: bool
__thiscall DICOMParser::OpenFile(class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &)"
(?OpenFile at DICOMParser at at QAE_NABV?$basic_string at DU?$
char_traits at D at std at at V?$allocator at D at 2 at at std at at at Z) already defined in
vtkDICOMParser.lib(vtkDICOMParser.dll)
ITKDICOMParser.lib(DICOMParser.obj) : error LNK2005: "public: bool
__thiscall DICOMParser::ReadHeader(void)"
(?ReadHeader at DICOMParser at at QAE_NXZ) already defined in
vtkDICOMParser.lib(vtkDICOMParser.dll)
ITKDICOMParser.lib(DICOMParser.obj) : error LNK2005: "public: void
__thiscall DICOMParser::ClearAllDICOMTagCallbacks(void)"
(?ClearAllDICOMTagCallbacks at DICOMParser at at QAEXXZ) already defined in
vtkDICOMParser.lib(vtkDICOMParser.dll)
ITKDICOMParser.lib(DICOMParser.obj) : warning LNK4006: "public:
__thiscall DICOMParser::DICOMParser(void)" (??0DICOMParser at at QAE at XZ)
already defined in vtkDICOMParser.lib(vtkDICOMParser.dll); second
definition ignored
ITKDICOMParser.lib(DICOMParser.obj) : warning LNK4006: "public: bool
__thiscall DICOMParser::OpenFile(class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &)"
(?OpenFile at DICOMParser at at QAE_NABV?$basic_string at DU
?$char_traits at D at std at at V?$allocator at D at 2 at at std at at at Z) already defined in
vtkDICOMParser.lib(vtkDICOMParser.dll); second definition ignored
ITKDICOMParser.lib(DICOMParser.obj) : warning LNK4006: "public: bool
__thiscall DICOMParser::ReadHeader(void)"
(?ReadHeader at DICOMParser at at QAE_NXZ) already defined in
vtkDICOMParser.lib(vtkDICOMParser.dll); second definition ignored
ITKDICOMParser.lib(DICOMParser.obj) : warning LNK4006: "public: void
__thiscall DICOMParser::ClearAllDICOMTagCallbacks(void)"
(?ClearAllDICOMTagCallbacks at DICOMParser at at QAEXXZ) already defined in
vtkDICOMParser.lib(vtkDICOMParser.dll); second definiti
on ignored
Creating library D:\packwin\vtkMy\bin\bin\Debug/test6_Corinne.lib and
object D:\packwin\vtkMy\bin\bin\Debug/test6_Corinne.exp
D:\packwin\vtkMy\bin\bin\Debug/test6_Corinne.exe : fatal error LNK1169:
one or more multiply defined symbols found
Error executing link.exe.