FDFImageIO error when build project with QT+VTK+ITK

104 Views Asked by At

I am building a project using Qt4.8.4+vtk5.10+itk4.6. While I got into a problem that had never occured.

In the first, it shows: link error: cannot open "4.lib". But I never heard a "4.lib" and I think it useless. So I delete it in the Linker.

Then: I got 30 errors saying: error LNK2001: unresolved external symbol "void __cdecl itk::FDFImageIOFactoryRegister__Private(void)" (?FDFImageIOFactoryRegister__Private@itk@@YAXXZ) D:\Workplace\NeuroLab\build\moc_WidgetThreeDMesh.obj....

I search through the file system and cannot find anywhere using FDFImageXXXX. I compiled ITK twice and try to enable/disable Module_FDFImageIO, but it does not work anyway.

So, anyone have got the same error?

1

There are 1 best solutions below

0
On

I find the error at last. I find that the source files I download had some errors. Because I re-download the VTK+ITK source code and recompiled them. No error report.

But there is a bug here. When you look at the lib list in vs20xx, you will find a strange 4.lib. When you integrate GDCM module into ITK, the error may probably report. The only thing you should do is add GDCM libs with full file path to your program.