[vtkusers] Simple Linking Question

Mark Wyszomierski markww at gmail.com
Wed Jan 19 14:16:23 EST 2005


First, please forgive me if this message has been posted twice, I
tried sending it once before subscribing to the mailing list!

I would like to use MFC in a static link of my project with VTK. I
have compiled VTK using MFC statically linked. When I go to compile my
sample application (also statically linked with MFC) I get two linking
errors as follow:


#include "vtkRenderer.h"

int main()
  vtkRenderer *renderer = vtkRenderer::New();


LNK 2005: __cdecl operator new(..) already defined in libcpmtd.lib
LNK 2005: __cdecl operator new[](..) already defined in libcpmtd.lib

Should I compile VTK using standard windows libraries to facilitate
static linking in MFC in the final project?


More information about the vtkusers mailing list