[Gc] Recompiling libgc 7.1

Christophe Meessen meessen at cppm.in2p3.fr
Thu Dec 11 10:07:28 PST 2008


Hello,

my laptop crashed and I had to reinstall libgc 7.1 on it. I decided to 
reinstall it from scratch, as a new user, to check if I had any problems.
The compiler is VC++ express 2008 (thus version 9 of  VC++).

I'm using NT_STATIC_THREADS_MAKEFILE and I get the following warning in 
some files.

1>c:\program files\microsoft visual studio 9.0\vc\include\new(82) : 
warning C4985: 'operator new[]' : attributs absents de la déclaration 
précédente.
1>        f:\christophe\sources\gc-7.1\include\gc_cpp.h(252) : voir la 
déclaration de 'operator new[]'
1>c:\program files\microsoft visual studio 9.0\vc\include\crtdbg.h(1170) 
: warning C4985: 'operator new' : attributs absents de la déclaration 
précédente.
1>        f:\christophe\sources\gc-7.1\include\gc_cpp.h(261) : voir la 
déclaration de 'operator new'

This is how I include libgc
#define GC_THREADS
#include "gc_cpp.h"
#include "gc_allocator.h"

If I swap include order, the first warning disappear.


I also had allot of problems earlier with STL and GC. I had to use the 
gc_allocator with STL containers to make sure their content gets collected.
It might be related to the previous problem.

Any clue how this should be resolved ?






More information about the Gc mailing list