[vtkusers] vtk 5.7 not building with gdcm 2.1

Mark Roden mmroden at gmail.com
Mon Nov 8 22:29:14 EST 2010


Hi all,

There are features in both the vtk git master and the gdcm sourceforge git
master that I need, and I need both to be wrapped in Java.

Unfortunately, the gdcm build process isn't work when I move from vtk 5.6 to
vtk 5.7 due to linker errors.  VTK 5.6 and gdcm git master work fine for my
setup (vs2008, either 64 bit or 32 bit compilation).  If I try to build vtk
with static linking, vtk_wrap_java doesn't work, and therefore
gdcm_wrap_java doesn't work, so statically linked libraries are out.

My linker errors come from the vtkgdcm project in gdcm, and are these:

1>------ Build started: Project: vtkgdcm, Configuration: Release x64 ------
1>Linking...
1>   Creating library H:\src\gdcm-cmake-build-mvs-64\bin\Release\vtkgdcm.lib
and object H:\src\gdcm-cmake-build-mvs-64\bin\Release\vtkgdcm.exp
1>vtkGDCMImageReader.obj : error LNK2019: unresolved external symbol
"public: void __cdecl vtkLookupTable16::SetNumberOfTableValues(__int64)"
(?SetNumberOfTableValues at vtkLookupTable16@@QEAAX_J at Z) referenced in function
"protected: int __cdecl vtkGDCMImageReader::LoadSingleFile(char const *,char
*,unsigned long &)" (?LoadSingleFile at vtkGDCMImageReader@@IEAAHPEBDPEADAEAK at Z
)
1>vtkGDCMImageWriter.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: class vtkStdString & __cdecl
vtkStringArray::GetValue(int)" (__imp_?GetValue at vtkStringArray
@@QEAAAEAVvtkStdString@@H at Z) referenced in function "protected: virtual char
* __cdecl vtkGDCMImageWriter::GetFileName(void)"
(?GetFileName at vtkGDCMImageWriter@@MEAAPEADXZ)
1>vtkGDCMThreadedImageReader2.obj : error LNK2001: unresolved external
symbol "__declspec(dllimport) public: class vtkStdString & __cdecl
vtkStringArray::GetValue(int)" (__imp_?GetValue at vtkStringArray
@@QEAAAEAVvtkStdString@@H at Z)
1>vtkGDCMImageWriter.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: int __cdecl
vtkStringArray::GetNumberOfValues(void)"
(__imp_?GetNumberOfValues at vtkStringArray@@QEAAHXZ) referenced in function
"protected: int __cdecl vtkGDCMImageWriter::WriteGDCMData(class vtkImageData
*,int)" (?WriteGDCMData at vtkGDCMImageWriter@@IEAAHPEAVvtkImageData@@H at Z)
1>vtkGDCMImageWriter.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: unsigned char * __cdecl
vtkDataArrayTemplate<unsigned char>::WritePointer(int,int)"
(__imp_?WritePointer@?$vtkDataArrayTemplate at E@@QEAAPEAEHH at Z) referenced in
function "protected: int __cdecl vtkGDCMImageWriter::WriteGDCMData(class
vtkImageData *,int)" (?WriteGDCMData at vtkGDCMImageWriter
@@IEAAHPEAVvtkImageData@@H at Z)
1>vtkGDCMPolyDataReader.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: int __cdecl
vtkCellArray::InsertNextCell(int,int const *)"
(__imp_?InsertNextCell at vtkCellArray@@QEAAHHPEBH at Z) referenced in function
"protected: int __cdecl
vtkGDCMPolyDataReader::RequestData_HemodynamicWaveformStorage(class
gdcm::Reader const &,class vtkInformationVector *)"
(?RequestData_HemodynamicWaveformStorage at vtkGDCMPolyDataReader
@@IEAAHAEBVReader at gdcm@@PEAVvtkInformationVector@@@Z)
1>vtkGDCMPolyDataReader.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: int __cdecl vtkPoints::InsertNextPoint(float
const * const)" (__imp_?InsertNextPoint at vtkPoints@@QEAAHQEBM at Z) referenced
in function "protected: int __cdecl
vtkGDCMPolyDataReader::RequestData_HemodynamicWaveformStorage(class
gdcm::Reader const &,class vtkInformationVector *)"
(?RequestData_HemodynamicWaveformStorage at vtkGDCMPolyDataReader
@@IEAAHAEBVReader at gdcm@@PEAVvtkInformationVector@@@Z)
1>vtkGDCMPolyDataReader.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: void __cdecl
vtkDataArray::InsertTuple3(int,double,double,double)"
(__imp_?InsertTuple3 at vtkDataArray@@QEAAXHNNN at Z) referenced in function
"protected: int __cdecl
vtkGDCMPolyDataReader::RequestData_RTStructureSetStorage(class gdcm::Reader
const &,class vtkInformationVector *)"
(?RequestData_RTStructureSetStorage at vtkGDCMPolyDataReader
@@IEAAHAEBVReader at gdcm@@PEAVvtkInformationVector@@@Z)
1>vtkGDCMPolyDataWriter.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: void __cdecl
vtkDoubleArray::GetTupleValue(int,double *)"
(__imp_?GetTupleValue at vtkDoubleArray@@QEAAXHPEAN at Z) referenced in function
"protected: void __cdecl vtkGDCMPolyDataWriter::WriteRTSTRUCTData(class
gdcm::File &,int)" (?WriteRTSTRUCTData at vtkGDCMPolyDataWriter
@@IEAAXAEAVFile at gdcm@@H at Z)
1>vtkGDCMPolyDataWriter.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: void __cdecl vtkPoints::GetPoint(int,double *
const)" (__imp_?GetPoint at vtkPoints@@QEAAXHQEAN at Z) referenced in function
"protected: void __cdecl vtkGDCMPolyDataWriter::WriteRTSTRUCTData(class
gdcm::File &,int)" (?WriteRTSTRUCTData at vtkGDCMPolyDataWriter
@@IEAAXAEAVFile at gdcm@@H at Z)
1>vtkGDCMPolyDataWriter.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: int __cdecl vtkCellArray::GetNextCell(int
&,int * &)" (__imp_?GetNextCell at vtkCellArray@@QEAAHAEAHAEAPEAH at Z) referenced
in function "protected: void __cdecl
vtkGDCMPolyDataWriter::WriteRTSTRUCTData(class gdcm::File &,int)"
(?WriteRTSTRUCTData at vtkGDCMPolyDataWriter@@IEAAXAEAVFile at gdcm@@H at Z)
1>vtkLookupTable16.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: unsigned short * __cdecl
vtkDataArrayTemplate<unsigned short>::WritePointer(int,int)"
(__imp_?WritePointer@?$vtkDataArrayTemplate at G@@QEAAPEAGHH at Z) referenced in
function "public: unsigned char * __cdecl
vtkLookupTable16::WritePointer(int,int)" (?WritePointer at vtkLookupTable16
@@QEAAPEAEHH at Z)
1>vtkLookupTable16.obj : error LNK2001: unresolved external symbol "public:
virtual int __cdecl vtkLookupTable::GetNumberOfAvailableColors(void)"
(?GetNumberOfAvailableColors at vtkLookupTable@@UEAAHXZ)
1>vtkLookupTable16.obj : error LNK2001: unresolved external symbol "public:
virtual int __cdecl vtkLookupTable::GetIndex(double)"
(?GetIndex at vtkLookupTable@@UEAAHN at Z)
1>vtkLookupTable16.obj : error LNK2001: unresolved external symbol "public:
virtual void __cdecl vtkLookupTable::SetNumberOfColors(int)"
(?SetNumberOfColors at vtkLookupTable@@UEAAXH at Z)
1>vtkLookupTable16.obj : error LNK2001: unresolved external symbol "public:
virtual int __cdecl vtkLookupTable::GetNumberOfColorsMinValue(void)"
(?GetNumberOfColorsMinValue at vtkLookupTable@@UEAAHXZ)
1>vtkLookupTable16.obj : error LNK2001: unresolved external symbol "public:
virtual int __cdecl vtkLookupTable::GetNumberOfColorsMaxValue(void)"
(?GetNumberOfColorsMaxValue at vtkLookupTable@@UEAAHXZ)
1>vtkLookupTable16.obj : error LNK2001: unresolved external symbol "public:
virtual int __cdecl vtkLookupTable::GetNumberOfColors(void)"
(?GetNumberOfColors at vtkLookupTable@@UEAAHXZ)
1>vtkGDCMThreadedImageReader2.obj : error LNK2019: unresolved external
symbol "__declspec(dllimport) public: int __cdecl
vtkStringArray::InsertNextValue(char const *)"
(__imp_?InsertNextValue at vtkStringArray@@QEAAHPEBD at Z) referenced in function
"public: virtual void __cdecl vtkGDCMThreadedImageReader2::SetFileName(char
const *)" (?SetFileName at vtkGDCMThreadedImageReader2@@UEAAXPEBD at Z)
1>H:\src\gdcm-cmake-build-mvs-64\bin\Release\vtkgdcm.dll : fatal error
LNK1120: 18 unresolved externals
1>Build log was saved at
"file://h:\src\gdcm-cmake-build-mvs-64\Utilities\VTK\vtkgdcm.dir\Release\BuildLog.htm"
1>vtkgdcm - 20 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 13 up-to-date, 0 skipped ==========

Again, these linker errors do not happen in vtk 5.6.

Here is the list of libraries that this project includes:

kernel32.lib
user32.lib
gdi32.lib
winspool.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
comdlg32.lib
advapi32.lib
..\..\bin\Release\gdcmMSFF.lib
vtkCommon.lib
vtkIO.lib
vtkImaging.lib
vtkRendering.lib
..\..\bin\Release\gdcmDICT.lib
..\..\bin\Release\gdcmIOD.lib
..\..\bin\Release\gdcmDSED.lib
..\..\bin\Release\gdcmCommon.lib
vtkDICOMParser.lib
vtkNetCDF_cxx.lib
vtkNetCDF.lib
vtkmetaio.lib
comctl32.lib
vtksqlite.lib
vtkpng.lib
vtktiff.lib
vtkzlib.lib
vtkjpeg.lib
vtkexpat.lib
vfw32.lib
vtkGraphics.lib
vtkFiltering.lib
vtksys.lib
ws2_32.lib
wsock32.lib
vtkverdict.lib
vtkftgl.lib
vtkfreetype.lib
opengl32.lib\

Is this a simple fix, like 5.7 introduced another language that needs to be
linked in here?  Or is the problem more complicated?

Thanks,
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101108/e267869e/attachment.htm>


More information about the vtkusers mailing list