[racket] CGC embedding on win64

From: ugo (gogo1969 at gmail.com)
Date: Mon Jan 3 04:25:25 EST 2011

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)

Thanks & Regards


On 12/31/2010 3:43 PM, Matthew Flatt wrote:
> At Fri, 31 Dec 2010 12:39:23 +0100, ugo wrote:
>>   I'm following the "Inside: Racket C API" guide, section 1.4.1
>> "Embedding Racket into a Program" to learn how to embed a racket
>> interpreter into my program: When I compile the sample code on win64
>> I'm  getting the following error at link time:
>> "error LNK2019: unresolved external symbol
>> __imp_scheme_external_get_thread_local_variables referenced in
>> function scheme_get_thread_local_variables"
> This is now fixed in the git repo.
>> Also, if I try to add the
>> static __declspec(thread) void *tls_space;
>> ...
>> scheme_register_tls_space(&tls_space, 0);
>> code as suggested in the guide I get an "identifier not found error"
> I've fixed the docs to say that this is only needed for 32-bit Windows.
> Thanks for the report!
> Matthew

Posted on the users mailing list.