[vtkusers] Simple Linking Question

Mark Wyszomierski markww at gmail.com
Wed Jan 19 13:36:27 EST 2005


Hi,

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:

[code]

#include "vtkRenderer.h"

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

[/code]

Errors:
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?

Thanks!
Mark



More information about the vtkusers mailing list