Zig: Can't compile an simple Hello World! on **zig-windows-x86_64-0.5.0+1d06c82c3**

Created on 25 Feb 2020  路  4Comments  路  Source: ziglang/zig

Most helpful comment

change your editor to use \n rather than \r\n or, run zig fmt on your code

I have solved this problem in a different way some seconds ago :)
Basically on Notepad++ i got selected the following stuff :
EOL Conversion = Unix
Encoding = UTF-8

All 4 comments

Yeah, Zig only supports Unix line endings so you'll have to adapt your editor when programming in Zig.

Guys, we're going to see a lot more of this the more popular Zig becomes with Win32 devs, so I think it's time to consider outputting more explanation text for this error -- that it isn't a compiler error, and it's an error by design, etc.

Yeah, Zig only supports Unix line endings so you'll have to adapt your editor when programming in Zig.

Guys, we're going to see a lot more of this the more popular Zig becomes with Win32 devs, so I think it's time to consider outputting more explanation text for this error -- that it isn't a compiler error, and it's an error by design, etc.

How to solve this problem ?

change your editor to use \n rather than \r\n or, run zig fmt on your code

change your editor to use \n rather than \r\n or, run zig fmt on your code

I have solved this problem in a different way some seconds ago :)
Basically on Notepad++ i got selected the following stuff :
EOL Conversion = Unix
Encoding = UTF-8

Was this page helpful?
0 / 5 - 0 ratings

Related issues

S0urc3C0de picture S0urc3C0de  路  3Comments

andrewrk picture andrewrk  路  3Comments

andrewrk picture andrewrk  路  3Comments

komuw picture komuw  路  3Comments

zimmi picture zimmi  路  3Comments