<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">​Hi Abdelkhalek,</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">most of these errors are VTK related. Can you replace the following line in you CMakeLists.txt:</div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace">TARGET_LINK_LIBRARIES( main ${QT_LIBRARIES} vtkGraphics vtkIO vtkCommon QVTK QVTKWidgetPlugin ${ITK_LIBRARIES})</font></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">with this:</div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace">TARGET_LINK_LIBRARIES( main ${QT_LIBRARIES} </font><span style="font-family:monospace,monospace">${VTK_LIBRARIES}</span><font face="monospace, monospace"> ${ITK_LIBRARIES})</font></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">and report?</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">HTH​,</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Dženan</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 26, 2016 at 2:28 PM, Abdelkhalek Bakkari <span dir="ltr"><<a href="mailto:bakkari.abdelkhalek@hotmail.fr" target="_blank">bakkari.abdelkhalek@hotmail.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div><div dir="ltr"><font face="Times New Roman,sans-serif" size="1" style="font-size:8pt" color="#000000"><br></font><br><br><br><div><hr>Date: Tue, 26 Jan 2016 12:25:06 -0600<br>From: <a href="mailto:chinander@gmail.com" target="_blank">chinander@gmail.com</a><br>To: <a href="mailto:insight-users@itk.org" target="_blank">insight-users@itk.org</a><br>Subject: Re: [ITK-users] fatal error LNK1120: 33 unresolved externals<div><div class="h5"><br><br><div dir="ltr">Can you post your CMakeLists.txt file?</div><div><br><div>On Tue, Jan 26, 2016 at 12:17 PM, Abdelkhalek Bakkari <span dir="ltr"><<a href="mailto:bakkari.abdelkhalek@hotmail.fr" target="_blank">bakkari.abdelkhalek@hotmail.fr</a>></span> wrote:<br><blockquote style="border-left:1px #ccc solid;padding-left:1ex">


<div><div dir="ltr"><font face="Times New Roman,sans-serif" size="1" style="font-size:8pt" color="#000000"><br></font>Dear Insight-users,<div><br></div><div>I tried to build my application using Visual Studio 2010. But, some errors appear during running.</div><div><br></div><div><div>Creating library C:/Application_26_01_2016/Build/Release/main.lib and object C:/Application_26_01_2016/Build/Release/main.exp</div><div>2>mainwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class vtkResliceImageViewer * __cdecl vtkResliceImageViewer::New(void)" (__imp_?New@vtkResliceImageViewer@@SAPAV1@XZ) referenced in function "public: static class vtkSmartPointer<class vtkResliceImageViewer> __cdecl vtkSmartPointer<class vtkResliceImageViewer>::New(void)" (?New@?$vtkSmartPointer@VvtkResliceImageViewer@@@@SA?AV1@XZ)</div><div>2>mainwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class vtkImageLuminance * __cdecl vtkImageLuminance::New(void)" (__imp_?New@vtkImageLuminance@@SAPAV1@XZ) referenced in function "public: static class vtkSmartPointer<class vtkImageLuminance> __cdecl vtkSmartPointer<class vtkImageLuminance>::New(void)" (?New@?$vtkSmartPointer@VvtkImageLuminance@@@@SA?AV1@XZ)</div><div>2>mainwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class vtkRenderWindow * __cdecl vtkRenderWindow::New(void)" (__imp_?New@vtkRenderWindow@@SAPAV1@XZ) referenced in function "public: static class vtkSmartPointer<class vtkRenderWindow> __cdecl vtkSmartPointer<class vtkRenderWindow>::New(void)" (?New@?$vtkSmartPointer@VvtkRenderWindow@@@@SA?AV1@XZ)</div><div>2>mainwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class vtkRenderer * __cdecl vtkRenderer::New(void)" (__imp_?New@vtkRenderer@@SAPAV1@XZ) referenced in function "public: static class vtkSmartPointer<class vtkRenderer> __cdecl vtkSmartPointer<class vtkRenderer>::New(void)" (?New@?$vtkSmartPointer@VvtkRenderer@@@@SA?AV1@XZ)</div><div>2>mainwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class vtkRenderWindowInteractor * __cdecl vtkRenderWindowInteractor::New(void)" (__imp_?New@vtkRenderWindowInteractor@@SAPAV1@XZ) referenced in function "public: static class vtkSmartPointer<class vtkRenderWindowInteractor> __cdecl vtkSmartPointer<class vtkRenderWindowInteractor>::New(void)" (?New@?$vtkSmartPointer@VvtkRenderWindowInteractor@@@@SA?AV1@XZ)</div><div>2>mainwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class vtkSmartVolumeMapper * __cdecl vtkSmartVolumeMapper::New(void)" (__imp_?New@vtkSmartVolumeMapper@@SAPAV1@XZ) referenced in function "public: static class vtkSmartPointer<class vtkSmartVolumeMapper> __cdecl vtkSmartPointer<class vtkSmartVolumeMapper>::New(void)" (?New@?$vtkSmartPointer@VvtkSmartVolumeMapper@@@@SA?AV1@XZ)</div><div>2>mainwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class vtkVolumeProperty * __cdecl vtkVolumeProperty::New(void)" (__imp_?New@vtkVolumeProperty@@SAPAV1@XZ) referenced in function "public: static class vtkSmartPointer<class vtkVolumeProperty> __cdecl vtkSmartPointer<class vtkVolumeProperty>::New(void)" (?New@?$vtkSmartPointer@VvtkVolumeProperty@@@@SA?AV1@XZ)</div><div>2>mainwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class vtkVolume * __cdecl vtkVolume::New(void)" (__imp_?New@vtkVolume@@SAPAV1@XZ) referenced in function "public: static class vtkSmartPointer<class vtkVolume> __cdecl vtkSmartPointer<class vtkVolume>::New(void)" (?New@?$vtkSmartPointer@VvtkVolume@@@@SA?AV1@XZ)</div><div>2>mainwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class vtkImageViewer2 * __cdecl vtkImageViewer2::New(void)" (__imp_?New@vtkImageViewer2@@SAPAV1@XZ) referenced in function "private: void __thiscall MainWindow::prepareImageViews(void)" (?prepareImageViews@MainWindow@@AAEXXZ)</div><div>2>mainwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall vtkSmartVolumeMapper::SetRequestedRenderModeToRayCast(void)" (__imp_?SetRequestedRenderModeToRayCast@vtkSmartVolumeMapper@@QAEXXZ) referenced in function "private: void __thiscall MainWindow::on_button_3d_clicked(void)" (?on_button_3d_clicked@MainWindow@@AAEXXZ)</div><div>2>mainwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall vtkSmartVolumeMapper::SetRequestedRenderModeToRayCastAndTexture(void)" (__imp_?SetRequestedRenderModeToRayCastAndTexture@vtkSmartVolumeMapper@@QAEXXZ) referenced in function "private: void __thiscall MainWindow::on_button_3d_clicked(void)" (?on_button_3d_clicked@MainWindow@@AAEXXZ)</div><div>2>mainwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall vtkRenderer::ResetCamera(void)" (__imp_?ResetCamera@vtkRenderer@@QAEXXZ) referenced in function "private: void __thiscall MainWindow::on_button_3d_clicked(void)" (?on_button_3d_clicked@MainWindow@@AAEXXZ)</div><div>2>mainwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall vtkVolume::SetProperty(class vtkVolumeProperty *)" (__imp_?SetProperty@vtkVolume@@QAEXPAVvtkVolumeProperty@@@Z) referenced in function "private: void __thiscall MainWindow::on_button_3d_clicked(void)" (?on_button_3d_clicked@MainWindow@@AAEXXZ)</div><div>2>mainwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall vtkVolume::SetMapper(class vtkAbstractVolumeMapper *)" (__imp_?SetMapper@vtkVolume@@QAEXPAVvtkAbstractVolumeMapper@@@Z) referenced in function "private: void __thiscall MainWindow::on_button_3d_clicked(void)" (?on_button_3d_clicked@MainWindow@@AAEXXZ)</div><div>2>mainwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall vtkVolumeProperty::SetColor(int,class vtkColorTransferFunction *)" (__imp_?SetColor@vtkVolumeProperty@@QAEXHPAVvtkColorTransferFunction@@@Z) referenced in function "private: void __thiscall MainWindow::on_button_3d_clicked(void)" (?on_button_3d_clicked@MainWindow@@AAEXXZ)</div><div>2>mainwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall vtkVolumeProperty::SetScalarOpacity(int,class vtkPiecewiseFunction *)" (__imp_?SetScalarOpacity@vtkVolumeProperty@@QAEXHPAVvtkPiecewiseFunction@@@Z) referenced in function "private: void __thiscall MainWindow::on_button_3d_clicked(void)" (?on_button_3d_clicked@MainWindow@@AAEXXZ)</div><div>2>mainwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall vtkVolumeProperty::ShadeOff(int)" (__imp_?ShadeOff@vtkVolumeProperty@@QAEXH@Z) referenced in function "private: void __thiscall MainWindow::on_button_3d_clicked(void)" (?on_button_3d_clicked@MainWindow@@AAEXXZ)</div><div>2>mainwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall vtkVolumeMapper::SetBlendModeToComposite(void)" (__imp_?SetBlendModeToComposite@vtkVolumeMapper@@QAEXXZ) referenced in function "private: void __thiscall MainWindow::on_button_3d_clicked(void)" (?on_button_3d_clicked@MainWindow@@AAEXXZ)</div><div>2>mainwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall vtkRenderWindowInteractor::SetRenderWindow(class vtkRenderWindow *)" (__imp_?SetRenderWindow@vtkRenderWindowInteractor@@QAEXPAVvtkRenderWindow@@@Z) referenced in function "private: void __thiscall MainWindow::on_button_3d_clicked(void)" (?on_button_3d_clicked@MainWindow@@AAEXXZ)</div><div>2>mainwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void * __thiscall vtkImageExport::GetCallbackUserData(void)" (__imp_?GetCallbackUserData@vtkImageExport@@QAEPAXXZ) referenced in function "protected: __thiscall itk::VTKImageToImageFilter<class itk::Image<short,3> >::VTKImageToImageFilter<class itk::Image<short,3> >(void)" (??0?$VTKImageToImageFilter@V?$Image@F$02@itk@@@itk@@IAE@XZ)</div><div>2>mainwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void * (__cdecl*__thiscall vtkImageExport::GetBufferPointerCallback(void)const )(void *)" (__imp_?GetBufferPointerCallback@vtkImageExport@@QBEP6APAXPAX@ZXZ) referenced in function "protected: __thiscall itk::VTKImageToImageFilter<class itk::Image<short,3> >::VTKImageToImageFilter<class itk::Image<short,3> >(void)" (??0?$VTKImageToImageFilter@V?$Image@F$02@itk@@@itk@@IAE@XZ)</div><div>2>mainwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: int * (__cdecl*__thiscall vtkImageExport::GetDataExtentCallback(void)const )(void *)" (__imp_?GetDataExtentCallback@vtkImageExport@@QBEP6APAHPAX@ZXZ) referenced in function "protected: __thiscall itk::VTKImageToImageFilter<class itk::Image<short,3> >::VTKImageToImageFilter<class itk::Image<short,3> >(void)" (??0?$VTKImageToImageFilter@V?$Image@F$02@itk@@@itk@@IAE@XZ)</div><div>2>mainwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void (__cdecl*__thiscall vtkImageExport::GetUpdateDataCallback(void)const )(void *)" (__imp_?GetUpdateDataCallback@vtkImageExport@@QBEP6AXPAX@ZXZ) referenced in function "protected: __thiscall itk::VTKImageToImageFilter<class itk::Image<short,3> >::VTKImageToImageFilter<class itk::Image<short,3> >(void)" (??0?$VTKImageToImageFilter@V?$Image@F$02@itk@@@itk@@IAE@XZ)</div><div>2>mainwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void (__cdecl*__thiscall vtkImageExport::GetPropagateUpdateExtentCallback(void)const )(void *,int *)" (__imp_?GetPropagateUpdateExtentCallback@vtkImageExport@@QBEP6AXPAXPAH@ZXZ) referenced in function "protected: __thiscall itk::VTKImageToImageFilter<class itk::Image<short,3> >::VTKImageToImageFilter<class itk::Image<short,3> >(void)" (??0?$VTKImageToImageFilter@V?$Image@F$02@itk@@@itk@@IAE@XZ)</div><div>2>mainwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: int (__cdecl*__thiscall vtkImageExport::GetNumberOfComponentsCallback(void)const )(void *)" (__imp_?GetNumberOfComponentsCallback@vtkImageExport@@QBEP6AHPAX@ZXZ) referenced in function "protected: __thiscall itk::VTKImageToImageFilter<class itk::Image<short,3> >::VTKImageToImageFilter<class itk::Image<short,3> >(void)" (??0?$VTKImageToImageFilter@V?$Image@F$02@itk@@@itk@@IAE@XZ)</div><div>2>mainwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: char const * (__cdecl*__thiscall vtkImageExport::GetScalarTypeCallback(void)const )(void *)" (__imp_?GetScalarTypeCallback@vtkImageExport@@QBEP6APBDPAX@ZXZ) referenced in function "protected: __thiscall itk::VTKImageToImageFilter<class itk::Image<short,3> >::VTKImageToImageFilter<class itk::Image<short,3> >(void)" (??0?$VTKImageToImageFilter@V?$Image@F$02@itk@@@itk@@IAE@XZ)</div><div>2>mainwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: double * (__cdecl*__thiscall vtkImageExport::GetOriginCallback(void)const )(void *)" (__imp_?GetOriginCallback@vtkImageExport@@QBEP6APANPAX@ZXZ) referenced in function "protected: __thiscall itk::VTKImageToImageFilter<class itk::Image<short,3> >::VTKImageToImageFilter<class itk::Image<short,3> >(void)" (??0?$VTKImageToImageFilter@V?$Image@F$02@itk@@@itk@@IAE@XZ)</div><div>2>mainwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: double * (__cdecl*__thiscall vtkImageExport::GetSpacingCallback(void)const )(void *)" (__imp_?GetSpacingCallback@vtkImageExport@@QBEP6APANPAX@ZXZ) referenced in function "protected: __thiscall itk::VTKImageToImageFilter<class itk::Image<short,3> >::VTKImageToImageFilter<class itk::Image<short,3> >(void)" (??0?$VTKImageToImageFilter@V?$Image@F$02@itk@@@itk@@IAE@XZ)</div><div>2>mainwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: int * (__cdecl*__thiscall vtkImageExport::GetWholeExtentCallback(void)const )(void *)" (__imp_?GetWholeExtentCallback@vtkImageExport@@QBEP6APAHPAX@ZXZ) referenced in function "protected: __thiscall itk::VTKImageToImageFilter<class itk::Image<short,3> >::VTKImageToImageFilter<class itk::Image<short,3> >(void)" (??0?$VTKImageToImageFilter@V?$Image@F$02@itk@@@itk@@IAE@XZ)</div><div>2>mainwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: int (__cdecl*__thiscall vtkImageExport::GetPipelineModifiedCallback(void)const )(void *)" (__imp_?GetPipelineModifiedCallback@vtkImageExport@@QBEP6AHPAX@ZXZ) referenced in function "protected: __thiscall itk::VTKImageToImageFilter<class itk::Image<short,3> >::VTKImageToImageFilter<class itk::Image<short,3> >(void)" (??0?$VTKImageToImageFilter@V?$Image@F$02@itk@@@itk@@IAE@XZ)</div><div>2>mainwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void (__cdecl*__thiscall vtkImageExport::GetUpdateInformationCallback(void)const )(void *)" (__imp_?GetUpdateInformationCallback@vtkImageExport@@QBEP6AXPAX@ZXZ) referenced in function "protected: __thiscall itk::VTKImageToImageFilter<class itk::Image<short,3> >::VTKImageToImageFilter<class itk::Image<short,3> >(void)" (??0?$VTKImageToImageFilter@V?$Image@F$02@itk@@@itk@@IAE@XZ)</div><div>2>mainwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class vtkImageExport * __cdecl vtkImageExport::New(void)" (__imp_?New@vtkImageExport@@SAPAV1@XZ) referenced in function "protected: __thiscall itk::VTKImageToImageFilter<class itk::Image<short,3> >::VTKImageToImageFilter<class itk::Image<short,3> >(void)" (??0?$VTKImageToImageFilter@V?$Image@F$02@itk@@@itk@@IAE@XZ)</div><div>2>mainwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class vtkImageImport * __cdecl vtkImageImport::New(void)" (__imp_?New@vtkImageImport@@SAPAV1@XZ) referenced in function "protected: __thiscall itk::ImageToVTKImageFilter<class itk::Image<class itk::RGBPixel<unsigned char>,3> >::ImageToVTKImageFilter<class itk::Image<class itk::RGBPixel<unsigned char>,3> >(void)" (??0?$ImageToVTKImageFilter@V?$Image@V?$RGBPixel@E@itk@@$02@itk@@@itk@@IAE@XZ)</div><div>2>C:\Application_26_01_2016\Build\Release\main.exe : fatal error LNK1120: 33 unresolved externals</div><div>2></div><div>2>Build FAILED.</div><div><br></div><div><br></div><div><br></div>Please, help me to solve these problems.</div><span><font color="#888888"><div><br></div><div><br><font size="3" face="Garamond">Abdelkhalek Bakkari</font><div><span style="line-height:14px"><font size="3" face="Garamond">Ph.D candidate in Computer Science</font></span></div><div><span style="line-height:20.82666778564453px;background-color:rgb(255,255,255)"><font face="Garamond" size="3">Institute of Applied Computer Science</font></span></div><div><span style="line-height:18.399999618530273px"><font face="Garamond" size="3">Lodz University of Technology, Poland</font></span></div><div><span style="line-height:18.399999618530273px"><font face="Garamond" size="3"><br></font></span></div><div><br></div></div>                                      </font></span></div></div>
<br>_____________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" rel="noreferrer" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" rel="noreferrer" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/insight-users" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/insight-users</a><br>
<br></blockquote></div><br></div>
<br>_____________________________________
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a>

Visit other Kitware open-source projects at
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a>

Kitware offers ITK Training Courses, for more information visit:
<a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a>

Please keep messages on-topic and check the ITK FAQ at:
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a>

Follow this link to subscribe/unsubscribe:
<a href="http://public.kitware.com/mailman/listinfo/insight-users" target="_blank">http://public.kitware.com/mailman/listinfo/insight-users</a></div></div></div>                                       </div></div>
<br>_____________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" rel="noreferrer" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" rel="noreferrer" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/insight-users" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/insight-users</a><br>
<br></blockquote></div><br></div>