build, windows: return an error code on failure