Matthew,

On 11/13/2015 06:25 PM, Matthew Flatt wrote:
At Thu, 12 Nov 2015 19:11:28 +0300, Dmitry Pavlov wrote:

The more interesting thing is that the 'longdouble.dll' is not put
into the runtime directory by 64-bit Racket, too. Still, the 64-bit
program works without any additional effort.

Oops, sorry, I just checked again, the 64-bit Racket fails too.

I think you'll need to call scheme_set_dll_path(), which should be
exported by the libracket DLL, but it isn't currently declared in
"scheme.h".

   __declspec(dllimport) void scheme_set_dll_path(wchar_t *s);

and provide the path containing "longdouble.dll".

Thanks, that has helped for 32-bit program.

This should be: that has helped for both 32-bit and 64-bit programs.

I've pushed a repair for this problem. The `--runtime` flags was simply
not copying over the DLLs as intended.

I also added a declaration and documentation for scheme_set_dll_path().

Thank you Matthew, it all works like a charm now.

I do this before scheme_main_stack_setup:

  {
    wchar_t path[100];

    mbstowcs(path, ".\\runtime\\lib", sizeof(path));
    scheme_set_dll_path(path);
  }

And this after scheme_basic_env:

  scheme_set_exec_cmd(argv[0]);


It even works when I run the program not from the
directory where the program is located. It somehow
guesses to look for the ".\\runtime\\lib" inside
the directory of argv[0], which is nice.

Best regards,

Dmitry

--
You received this message because you are subscribed to the Google Groups "Racket 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to