Lartu / ldpl

COBOL-like programming language that compiles to C++. With serious dinosaurs with neckties and briefcases 🦕💼
https://www.ldpl-lang.org/
Apache License 2.0
160 stars 24 forks source link

Advise Windows user to change git core.autoclrf config #84

Closed giant-teapot closed 5 years ago

giant-teapot commented 5 years ago

Earlier, I was trying to build LDPL on Windows (for æsthetic reasons, let's say) and stumble on a lenghty compilation error. ldpl_included_lib.cpp was ill-formed.

I had no such issue on GNU/Linux, and I quickly found out that Awk does not work well with DOS EOL. For instance, where you would expect:

void add_ldpllib(compiler_state & state){
    state.add_var_code("#include <sstream>");
    state.add_var_code("#include <math.h>");

this is what I had:

void add_ldpllib(compiler_state & state){
    state.add_var_code("#include <sstream>
");
    state.add_var_code("#include <math.h>
");

I though it would be wise to mention in the README that windows user should change their git config to use Unix EOL. It's not like it's an issue with most available tools and editor nowadays.

I'll also check the documentation repo to mention this pitfall there as well.

Lartu commented 5 years ago

Woah, great! Thank you very, very much for this! Merging it right now! 😄