[Gc] Using libgc problems with VC++ 2003

Christophe Meessen meessen at cppm.in2p3.fr
Wed Mar 21 23:23:29 PST 2007


Hello,

following the previous discussion I decided to give it a try.

I downloaded gc6.8 and I am using vc++ 2003. My application needs to
work on windows and linux. So I first tried with windows.

Finding the recepie to build it was not trivial since it is not
explicitly described in the documentation. So I might have done
something wrong.

I first started with the DLL multithreaded version since my app is multi
threaded. I used the appropriate make file and started nmake from the vc
command line window. It all compiled without any problem.

I then created a project and used gctest as main program. It also
compiled and linked well. I had to put the dll in the system32
directory. But when I start the program it crashes. Apparentely even
before entering main call.

This is the stack trace where the program crashes.
 	ntdll.dll!7c911230() 	
 	ntdll.dll!7c97c943() 	
 	ntdll.dll!7c97cd80() 	
 	ntdll.dll!7c970af8() 	
 	mscorwks.dll!791d6a28() 	
 	gc.dll!1000833b() 	
 	kernel32.dll!7c85e9cf() 	
>	test-gc.exe!_CrtIsValidHeapPointer(const void * pUserData=0x009e1ff8)
 Line 1807	C
 	test-gc.exe!_free_dbg_lk(void * pUserData=0x009e1ff8, int
nBlockUse=0x00000001)  Line 1132 + 0x9	C
 	test-gc.exe!_free_dbg(void * pUserData=0x009e1ff8, int
nBlockUse=0x00000001)  Line 1070 + 0xd	C
 	test-gc.exe!operator delete(void * pUserData=0x009e1ff8)  Line 54 +
0x10	C++
 	0031a2de()	
 	test-gc.exe!main(__int32 argc = 0x1, char** argv = 0x06e133a0) Line
244	C++
 	test-gc.exe!mainCRTStartup()  Line 259 + 0x19	C

I use the default project options and it is in debug mode. The gc
library is apparently not. Any suggestions ?


More information about the Gc mailing list