[Gc] Usage of gc 6.3 in VS6

Lutz Feldgen feldgen at flexsecure.de
Wed Feb 16 06:11:09 PST 2005


I am trying to include gc to my application written in C++ with Visual
Studio 6.

I compiled gc with "nmake" in Windows with NT_MAKEFILE, added the
resulting gc.lib and most of the headers to my project.

Unfortunately the VS6 compiler in debug mode complains about

warning C4273: 'new' : inconsistent dll linkage.  dllexport assumed.

This warning points to gc_cpp.h

 // This new operator is used by VC++ in case of Debug builds !
 void* operator new(  size_t size,
		      int ,//nBlockUse,
		      const char * szFileName,
		      int nLine );

But there is also a

 void *operator new[]( size_t size );

My code which calls the "new" is:

	int number = 10;
	PCCERT_CONTEXT p_certificateArray = new PCCERT_CONTEXT[number];

What is going wrong here?

Any help is appreciated!

Lutz Feldgen

More information about the Gc mailing list