<div dir="ltr"><div><div><div><div><div><div>Hi All,<br><br>I have been stuck with a MFC-related problem for quite some time now. I have read through many forums, VTK-Users posts, etc. without any luck.<br><br></div><div>My basic problem is that <b>vtkMFC.lib</b> is not getting built; no matter how I build my project or configure it.<br>
<br></div><div>These are the steps I have followed:<br><br></div>1. Generate <b>VTK.sln</b> using CMake 2.8.9 with VTK_USE_GUISUPPORT, BUILD_SHARED_LIBS, VTK_USE_MFC, BUILD_EXAMPLES turned <i><b>ON</b></i> and VTK_USE_VIDEO_FOR_WINDOWS turned <i><b>OFF</b></i>. <br>
</div>2. Open <b>VTK.sln</b> on VS-2008 and build ONLY <b>vtkMFC.sln</b>.<br></div>3. Build entire solution. <br></div>{I have also tried with points 2 and 3 inter-changed with no result}<br></div><div>4. There are 6 erros; of which 3 are to do with the fact that vtkMFC.lib isn't there (for the examples. obviously). The rest are regarding a couple of resolved external symbols,<br>
<br>error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class vtkDataSetReader * __cdecl vtkDataSetReader::New(void)" (__imp_?New@vtkDataSetReader@@SAPAV1@XZ) referenced in function "protected: __thiscall CSampleDoc::CSampleDoc(void)" (??0CSampleDoc@@IAE@XZ) in SampleDoc.obj<br>
<br>error LNK2019: unresolved external symbol "__declspec(dllimport) public: class vtkDataSet * __thiscall vtkDataSetReader::GetOutput(void)" (__imp_?GetOutput@vtkDataSetReader@@QAEPAVvtkDataSet@@XZ) referenced in function "public: virtual int __thiscall CSampleDoc::OnOpenDocument(char const *)" (?OnOpenDocument@CSampleDoc@@UAEHPBD@Z) in SampleDoc.obj<br>
<br></div><div>The files generated in <b>Debug/bin</b> for <b>vtkMFC</b> solution are vtkMFC.<b>dll</b>, vtkMFC.<b>idb</b>, vtkMFC.<b>ilk</b>, vtkMFC.<b>pdb</b>.<br></div><br></div>Any help in this regard would be much appreciated.<br>
<div><div><br clear="all"><div><div><div><div><div><div><div><div dir="ltr"><div></div>Best,<br>Sarthak</div></div>
</div></div></div></div></div></div></div></div></div>