Bug #13920
closed
I am linking to the static library from a win32 application (not console app) set to use the same runtime version as the ruby build. I have tried setting up a console with AllocConsole() and assigning *stdin to this console before initializing ruby, but it doesn't help.
rocifier (Ryan O'Connor) wrote:
fileno(stdin)
returns -2
Sounds similar to #13546
MSP-Greg (Greg L) wrote:
rocifier (Ryan O'Connor) wrote:
fileno(stdin)
returns -2
Sounds similar to #13546
Thanks my issue is very similar. The issue you linked to presents some undocumented requirements. When I try calling rb_w32_sysinit
it crashes on this line:
https://github.com/ruby/ruby/blob/c08f7b80889b531865e74bc5f573df8fa27f2088/win32/win32.c#L839
What is the exact version of ucrtbased.dll that the assembly code in this function is designed for?
EDIT
I got it working! Basically I had to build with these flags in Makefile
for debug:
RUNTIMEFLAG = /MDd LDFLAGS = /NODEFAULTLIB:MSVCRT DEBUGFLAGS = /Zi /D "_DEBUG"
I deleted all traces of the ucrtbased.dll on my system which were of version 10.0.15063.137
and copied version 10.0.10240.16384
to C:\Windows\SysWOW64
(I'm on Windows 10). The correct working version is the one from the Windows 10 SDK.
- Status changed from Open to Closed
Also available in: Atom
PDF
Like0
Like0Like0Like0Like0