[Gc] Usage of gc 6.3 in VS6

Boehm, Hans hans.boehm at hp.com
Fri Feb 18 17:54:12 PST 2005


Try gc_allocator.h instead of new_gc_alloc.h.  The former should rely
only
on the allocator specification in the standard.  The latter assumes an
STL
implementation derived from the SGI one.  I don't think VS6 qualifies.

The documentation should mention gc_allocator.h first.  I'll change it.

Hans

> -----Original Message-----
> From: gc-bounces at napali.hpl.hp.com 
> [mailto:gc-bounces at napali.hpl.hp.com] On Behalf Of Lutz Feldgen
> Sent: Wednesday, February 16, 2005 6:49 AM
> To: gc at napali.hpl.hp.com
> Subject: RE: [Gc] Usage of gc 6.3 in VS6
> 
> 
> Hi again,
> 
> I just tried to create a release-version of my software 
> because this error maps to debug-versions new[]
> 
> Here I get the following:
> 
> new_gc_alloc.h(354) : error C2144: syntax error : missing ';' 
> before type 'simple_alloc'
> new_gc_alloc.h(354) : error C2501: '__STL_BEGIN_NAMESPACE' : 
> missing storage-class or type specifiers
> new_gc_alloc.h(354) : fatal error C1004: unexpected end of file found
> 
> I tried to resolve these errors but was not successful at all ;(
> 
> Regards,
> 
> Lutz Feldgen
> 
> -----Original Message-----
> From: gc-bounces at napali.hpl.hp.com 
> [mailto:gc-bounces at napali.hpl.hp.com]
> On Behalf Of Lutz Feldgen
> Sent: Mittwoch, 16. Februar 2005 15:11
> To: gc at napali.hpl.hp.com
> Subject: [Gc] Usage of gc 6.3 in VS6
> 
> 
> Hi,
> 
> 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
> 
> _______________________________________________
> Gc mailing list
> Gc at linux.hpl.hp.com 
> http://www.hpl.hp.com/hosted/linux/mail-archives/gc/
> 
> _______________________________________________
> Gc mailing list
> Gc at linux.hpl.hp.com 
> http://www.hpl.hp.com/hosted/linux/mail-archives/gc/
> 


More information about the Gc mailing list