[vtkusers] VTK MFC linking problem

Alex Malyushytskyy alexmalvtk at gmail.com
Fri Jul 13 17:03:27 EDT 2012


check that you do not have vtkMFC_EXPORTS macro defined in your project.

On Fri, Jul 13, 2012 at 4:19 AM, Gishara Indeewarie <gish.777 at gmail.com> wrote:
> Hi all,
>
> I am currently upgrading vtk from 5.0 to 5.8. I got the following linking
> errors there:
>
> vtkPBFEAView.obj : warning LNK4217: locally defined symbol
> ?DrawDC at vtkMFCWindow@@QAEXPAVCDC@@@Z (public: void __thiscall
> vtkMFCWindow::DrawDC(class CDC *)) imported in function "protected: virtual
> void __thiscall CvtkPBFEAView::OnDraw(class CDC *)"
> (?OnDraw at CvtkPBFEAView@@MAEXPAVCDC@@@Z)
>
> 1>vtkMDIView.obj : warning LNK4049: locally defined symbol
> ?DrawDC at vtkMFCWindow@@QAEXPAVCDC@@@Z (public: void __thiscall
> vtkMFCWindow::DrawDC(class CDC *)) imported 1>vtkPBFEAView.obj : warning
> LNK4217: locally defined symbol ??0vtkMFCWindow@@QAE at PAVCWnd@@@Z (public:
> __thiscall vtkMFCWindow::vtkMFCWindow(class CWnd *)) imported in function
> "public: void __thiscall vtkPBFEAViewImpl::initialize(class CWnd *)"
> (?initialize at vtkPBFEAViewImpl@@QAEXPAVCWnd@@@Z)
>
> 1>vtkMDIView.obj : warning LNK4049: locally defined symbol
> ??0vtkMFCWindow@@QAE at PAVCWnd@@@Z (public: __thiscall
> vtkMFCWindow::vtkMFCWindow(class CWnd *)) imported 1>vtkPBFEAView.obj :
> warning LNK4217: locally defined symbol ??1vtkMFCWindow@@UAE at XZ (public:
> virtual __thiscall vtkMFCWindow::~vtkMFCWindow(void)) imported in function
> "public: virtual void * __thiscall vtkMFCWindow::`scalar deleting
> destructor'(unsigned int)" (??_GvtkMFCWindow@@UAEPAXI at Z)
>
> 1>vtkMDIView.obj : warning LNK4217: locally defined symbol
> ??1vtkMFCWindow@@UAE at XZ (public: virtual __thiscall
> vtkMFCWindow::~vtkMFCWindow(void)) imported in function "public: void
> __thiscall vtkMDIViewImpl::adjust_contours(int,double,double)"
> (?adjust_contours at vtkMDIViewImpl@@QAEXHNN at Z)
>
> 1>vtkMFCWindow.obj : error LNK2019: unresolved external symbol
> "_declspec(dllimport) const vtkMFCWindow::`vftable'"
> (_imp_??_7vtkMFCWindow@@6B@) referenced in function "public: __thiscall
> vtkMFCWindow::vtkMFCWindow(class CWnd *)" (??0vtkMFCWindow@@QAE at PAVCWnd@@@Z)
>
>
>
>
> I have included vtkmfc.lib to resolve those linking errors. Then I got
> another linking error as follow:
>
> 1>vtkMFC.lib(vtkMFC.dll) : error LNK2005: "public: void __thiscall
> vtkMFCWindow::DrawDC(class CDC *)" (?DrawDC at vtkMFCWindow@@QAEXPAVCDC@@@Z)
> already defined in vtkMFCWindow.obj
> 1>vtkMFC.lib(vtkMFC.dll) : error LNK2005: "public: __thiscall
> vtkMFCWindow::vtkMFCWindow(class CWnd *)" (??0vtkMFCWindow@@QAE at PAVCWnd@@@Z)
> already defined in vtkMFCWindow.obj
> 1>vtkMFC.lib(vtkMFC.dll) : error LNK2005: "public: virtual __thiscall
> vtkMFCWindow::~vtkMFCWindow(void)" (??1vtkMFCWindow@@UAE at XZ) already defined
> in vtkMFCWindow.obj
>
> Please someone help me to fix this issue.
> Thanks a lot.
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



More information about the vtkusers mailing list