[racket] CGC embedding on win64

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Mon Jan 3 10:08:04 EST 2011

At Mon, 03 Jan 2011 10:25:25 +0100, ugo wrote:
> Thanks a lot!
> 
> I was able to make the racket embedding code work...
> 
> ...but now I have another problem: When I try to call scheme_basic_env() 
> the program crashes with an access violation error (reading location 0x0 
> so it's probably due to a NULL pointer).
> I cannot perform any further debugging because I was not able to build 
> racket in debug mode, I tried to build debug versions of the libraries 
> but Visual Studio reports a missing .\debug\sgc.lib file.
> 
> Is there a way to build everything in debug mode ?
> 
> (running on Windows 7 64bit/VS2008)

You should be able to build the DLLs using MSVC and selecting the
"Debug" project. But that actually just turns off optimization;
debugging ".pdb" files are generated with the "Release" build.

I'm not sure why he debugger wants "sgc.lib", since that's used only
for the "SGC" project. Try building the "SGC" project, and then
re-build the "Release" project, and maybe that will make the debugger
happy.


But are you calling scheme_basic_env() directly? Normally you should
use scheme_main_setup() or scheme_main_stack_setup(), which sets GC and
thread parameters before calling scheme_basic_env().



Posted on the users mailing list.