Closed
Description
Following the guide at https://github.com/crystal-lang/crystal/wiki/Porting-to-Windows.
Compiling the Hello World
program using bin/crystal build --cross-compile --target x86_64-pc-windows-msvc hello_world.cr
throws the following error:
Error in hello_world.cr:1: while requiring "prelude"
puts "Hello world!"
^
in src/prelude.cr:28: while requiring "string"
require "string"
^
in src/string.cr:4338: while requiring "./string/*"
require "./string/*"
^
in src/string/builder.cr:1: while requiring "io"
require "io"
^
in src/io.cr:1216: while requiring "./io/*"
require "./io/*"
^
in src/io/file_descriptor.cr:2: while requiring "crystal/system/file_descriptor"
require "crystal/system/file_descriptor"
^
in src/crystal/system/file_descriptor.cr:1: expanding macro
{% if flag?(:win32) %}
^
in macro 'macro_94431958465936' /home/george/Desktop/crystal-master/src/crystal/system/file_descriptor.cr:1, line 2:
1.
> 2. require "./win32/file_descriptor"
while requiring "./win32/file_descriptor"
in src/crystal/system/win32/file_descriptor.cr:1: while requiring "File/stat": can't find file 'File/stat'
If you're trying to require a shard:
- Did you remember to run `shards install`?
- Did you make sure you're running the compiler in the same directory as your shard.yml?
require "File/stat"
It seems the the win32 FileDescriptor class didnt get updated to use File::Info
vs the old File::Stat
Metadata
Metadata
Assignees
Labels
No labels