I was today trying to figure why my project failed compiling, because the only information i got was that “Build.bat finished with a -1 return code”.
Then i tried to run the build command in the cmd, and… the error message was a lot more useful.
It said that i was declaring a enum member variable in the wrong way, so, i should declare it with TEnumAsByte (the message even gave me the line in my .H file where the error was).
So, shouldn’t Visual Studio show this error instead of simply “Build.bat finished with a -1 return code”? .
As we see, the error only says that the command exited with an exit code of -1.
Now, we execute the same command line from the CMD:
Now the cause of the error is more clear, as the line in bold shows. This is what Visual Studio should have told me, not a simple “command X finished with a -1 error code” message :).