<div><div class="gmail_quote">2010/7/13 Xiaopeng Yang <span dir="ltr">&lt;<a href="mailto:yxp233@postech.ac.kr">yxp233@postech.ac.kr</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Dear all,<br>
<br>
I made a CMakeLists.txt file to compile TestSliderWidget2D.cxx. I succedded in generating C++ project file by Cmake. However, when I release the project, errors occured. <br>
<br>
I attached my CMakeLists.txt file and TestSliderWidget2D.cxx file to this email.<br>
<br>
Can anybody know why these kinds of errors occured? Thank you.<br>
<br>
<font size="1">
<p>1&gt;------ Build started: Project: TestSliderWidget2D, Configuration: Release Win32 ------</p>
<p>1&gt;Compiling...</p>
<p>1&gt;TestSliderWidget2D.cxx</p>
<p>1&gt;Linking...</p>
<p>1&gt;TestSliderWidget2D.obj : error LNK2019: unresolved external symbol &quot;__declspec(dllimport) public: class vtkWidgetRepresentation * __thiscall vtkAbstractWidget::GetRepresentation(void)&quot; (__imp_?GetRepresentation@vtkAbstractWidget@@QAEPAVvtkWidgetRepresentation@@XZ) referenced in function &quot;public: virtual void __thiscall vtkSlider2DCallback::Execute(class vtkObject *,unsigned long,void *)&quot; (?Execute@vtkSlider2DCallback@@UAEXPAVvtkObject@@KPAX@Z)</p>

<p>1&gt;TestSliderWidget2D.obj : error LNK2019: unresolved external symbol &quot;__declspec(dllimport) public: void __thiscall vtkSliderWidget::SetAnimationModeToAnimate(void)&quot; (__imp_?SetAnimationModeToAnimate@vtkSliderWidget@@QAEXXZ) referenced in function &quot;int __cdecl TestSliderWidget2D(int,char * * const)&quot; (?TestSliderWidget2D@@YAHHQAPAD@Z)</p>

<p>1&gt;TestSliderWidget2D.obj : error LNK2019: unresolved external symbol &quot;__declspec(dllimport) protected: void __thiscall vtkAbstractWidget::SetWidgetRepresentation(class vtkWidgetRepresentation *)&quot; (__imp_?SetWidgetRepresentation@vtkAbstractWidget@@IAEXPAVvtkWidgetRepresentation@@@Z) referenced in function &quot;int __cdecl TestSliderWidget2D(int,char * * const)&quot; (?TestSliderWidget2D@@YAHHQAPAD@Z)</p>

<p>1&gt;TestSliderWidget2D.obj : error LNK2019: unresolved external symbol &quot;__declspec(dllimport) public: static class vtkSliderWidget * __cdecl vtkSliderWidget::New(void)&quot; (__imp_?New@vtkSliderWidget@@SAPAV1@XZ) referenced in function &quot;int __cdecl TestSliderWidget2D(int,char * * const)&quot; (?TestSliderWidget2D@@YAHHQAPAD@Z)</p>

<p>1&gt;TestSliderWidget2D.obj : error LNK2019: unresolved external symbol &quot;__declspec(dllimport) public: class vtkCoordinate * __thiscall vtkSliderRepresentation2D::GetPoint2Coordinate(void)&quot; (__imp_?GetPoint2Coordinate@vtkSliderRepresentation2D@@QAEPAVvtkCoordinate@@XZ) referenced in function &quot;int __cdecl TestSliderWidget2D(int,char * * const)&quot; (?TestSliderWidget2D@@YAHHQAPAD@Z)</p>

<p>1&gt;TestSliderWidget2D.obj : error LNK2019: unresolved external symbol &quot;__declspec(dllimport) public: class vtkCoordinate * __thiscall vtkSliderRepresentation2D::GetPoint1Coordinate(void)&quot; (__imp_?GetPoint1Coordinate@vtkSliderRepresentation2D@@QAEPAVvtkCoordinate@@XZ) referenced in function &quot;int __cdecl TestSliderWidget2D(int,char * * const)&quot; (?TestSliderWidget2D@@YAHHQAPAD@Z)</p>

<p>1&gt;TestSliderWidget2D.obj : error LNK2019: unresolved external symbol &quot;__declspec(dllimport) public: void __thiscall vtkSliderRepresentation::SetValue(double)&quot; (__imp_?SetValue@vtkSliderRepresentation@@QAEXN@Z) referenced in function &quot;int __cdecl TestSliderWidget2D(int,char * * const)&quot; (?TestSliderWidget2D@@YAHHQAPAD@Z)</p>

<p>1&gt;TestSliderWidget2D.obj : error LNK2019: unresolved external symbol &quot;__declspec(dllimport) public: static class vtkSliderRepresentation2D * __cdecl vtkSliderRepresentation2D::New(void)&quot; (__imp_?New@vtkSliderRepresentation2D@@SAPAV1@XZ) referenced in function &quot;int __cdecl TestSliderWidget2D(int,char * * const)&quot; (?TestSliderWidget2D@@YAHHQAPAD@Z)</p>

<p>1&gt;MSVCRT.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup</p>
<p>1&gt;C:\Users\EDT\Desktop\Slider event\bin\Release\TestSliderWidget2D.exe : fatal error LNK1120: 9 unresolved externals</p>
<p>1&gt;Build log was saved at &quot;file://c:\Users\EDT\Desktop\Slider event\bin\TestSliderWidget2D.dir\Release\BuildLog.htm&quot;</p>
<p>1&gt;TestSliderWidget2D - 10 error(s), 0 warning(s)</p>
<p>2&gt;------ Skipped Build: Project: ALL_BUILD, Configuration: Release Win32 ------</p>
<p>2&gt;Project not selected to build for this solution configuration</p>
<p>========== Build: 0 succeeded, 1 failed, 1 up-to-date, 1 skipped ==========</p>
</font><br><br>
<div>
Ergonomic Design Technology Lab<br>
Dept. of Industrial and Management Engineering<br>
Pohang Univ. of Science and Technology<br>
South Korea<br>
</div><div><br></div></blockquote>It looks like you have forgotten to link to vtkWidges. Take a look at the CMakeLists.txt here:<div><a href="http://www.vtk.org/Wiki/VTK/Examples/Widgets/Slider2D">http://www.vtk.org/Wiki/VTK/Examples/Widgets/Slider2D</a></div>
<div><a href="http://www.vtk.org/Wiki/VTK/Examples/Widgets/Slider2D"></a><br clear="all">Thanks,<br><br></div><div>David </div></div><br></div>