BrettMayson / HEMTT

Build System for Arma 3
https://brettmayson.github.io/HEMTT
GNU General Public License v2.0
109 stars 40 forks source link

HEMTT failing to build project with malformed preprocess error #109

Closed JonBons closed 5 years ago

JonBons commented 5 years ago

HEMTT Version: 0.6.0 Project: https://drive.google.com/file/d/17uCOmBvWEZc_kjsaB1R8Gms3sUljDTG9/view?usp=sharing

Description:

I've been able to build this project with makepbo just fine but when using HEMTT I get the error, included is another hpp data_working.hpp that has had indentation converted to spaces and HEMTT builds that file just fine.

HEMTT Output:

.\hemtt.exe build
  Building 1
error: addons\example
Failed to build PBO:
Failed to parse config:
Failed to preprocess config:
Failed to preprocess include "data.hpp":
In line \\?\C:\Users\JonBons\Documents\GitExt\hemtt-example\addons\example\data.hpp:0:

 };iDispersionCoefY = 0;ncher {Base {0_F {_Pistol_heavy_02_F {
                             ^

", expected: "\n", "##", "\r\n", "[a-zA-Z0-9_]", "[^\"\r\n]", "\\\\", "\\", "/*", "\"", "//", "#"
     Built 0
    Failed 1 [example]
  Finished TEST
BrettMayson commented 5 years ago

I believe this is being caused by the Windows CRLF ^M character. Try switching to LF in your IDE. If that fixes the issues it should be an issue filled with armake2 as an incompatibility with CRLF.

jonpas commented 5 years ago

There is a PR open for more CRLF fixes in armake2.

BrettMayson commented 5 years ago

Missed that, closing here in favour of armake2 PR #29.

Krzmbrzl commented 5 years ago

I believe the PR only takes care of the malformed error message (the question mark in the beginning). I wouldn't be aware that it fixes the root of any error though...

Although it might be worth to just try it out and see whether it fixed something "by accident"

Krzmbrzl commented 5 years ago

So the problem wasn't about windows-newlines but because of (old) mac newlines which consist of single carriage return characters This problem gets addressed in https://github.com/KoffeinFlummi/armake2/pull/40 - just so the correct PR is referenced here