[vtkusers] [VTK 5.10.1][Visual Studio 2008][Windows XP 32-bit] - MFC Related Problem

Sarthak Pati sarthak.pati at gmail.com
Wed Jan 9 04:00:13 EST 2013


Hi All,

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.

My basic problem is that *vtkMFC.lib* is not getting built; no matter how I
build my project or configure it.

These are the steps I have followed:

1. Generate *VTK.sln* using CMake 2.8.9 with VTK_USE_GUISUPPORT,
BUILD_SHARED_LIBS, VTK_USE_MFC, BUILD_EXAMPLES turned *ON* and
VTK_USE_VIDEO_FOR_WINDOWS turned *OFF*.
2. Open *VTK.sln* on VS-2008 and build ONLY *vtkMFC.sln*.
3. Build entire solution.
{I have also tried with points 2 and 3 inter-changed with no result}
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,

error LNK2019: unresolved external symbol "__declspec(dllimport) public:
static class vtkDataSetReader * __cdecl vtkDataSetReader::New(void)"
(__imp_?New at vtkDataSetReader@@SAPAV1 at XZ) referenced in function "protected:
__thiscall CSampleDoc::CSampleDoc(void)" (??0CSampleDoc@@IAE at XZ) in
SampleDoc.obj

error LNK2019: unresolved external symbol "__declspec(dllimport) public:
class vtkDataSet * __thiscall vtkDataSetReader::GetOutput(void)"
(__imp_?GetOutput at vtkDataSetReader@@QAEPAVvtkDataSet@@XZ) referenced in
function "public: virtual int __thiscall CSampleDoc::OnOpenDocument(char
const *)" (?OnOpenDocument at CSampleDoc@@UAEHPBD at Z) in SampleDoc.obj

The files generated in *Debug/bin* for *vtkMFC* solution are vtkMFC.*dll*,
vtkMFC.*idb*, vtkMFC.*ilk*, vtkMFC.*pdb*.

Any help in this regard would be much appreciated.

Best,
Sarthak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130109/c465b4b7/attachment.htm>


More information about the vtkusers mailing list