Page URL: https://dart.dev/tutorials/server/get-started
Page source: https://github.com/dart-lang/site-www/tree/master/src/_tutorials/server/get-started.md
Description of issue:
In Compile for production are the given instructions specific to Mac/linux OS ?
On Windows the compiled app wasn't executable until extension of the app was specified as .exe .
PS E:\vscode-workspace\dart-commandl-ine\cli> dart2native .\bin\main.dart -o .\bin\my_native_compiled_app
There was no error thrown for dart2native command.
This resulted in my_native_compiled_app of type file on windows.
Generated: e:\vscode-workspace\dart-commandl-ine\cli\bin\my_native_compiled_app
Trying to execute this generated file gave error:
FullyQualifiedErrorId : NativeCommandFailed
.exe extension as:PS E:\vscode-workspace\dart-commandl-ine\cli> dart2native .\bin\main.dart -o .\bin\my_native_compiled_app.exe
Executable got generated without errors.
Generated: e:\vscode-workspace\dart-commandl-ine\cli\bin\my_native_compiled_app.exe
No errors were thrown while running
PS E:\vscode-workspace\dart-commandl-ine\cli> .\bin\my_native_compiled_app
output:
Hello world: 21!
@kevmoo or @mit-mit do you know the answer to this?
@mit-mit ?
Yes, .exe would be the appropriate extension on Windows. If you omit the -o flag, I believe it does that by default.
Thank you @mit-mit ,
Tried without -o flag
PS E:\vscode-workspace\dart-commandl-ine\cli> dart2native .\bin\main.dart --verbose
Generating AOT kernel dill.
Generating AOT snapshot.
Generating executable.
Generated: e:\vscode-workspace\dart-commandl-ine\cli\bin\main.exe
Executable was generated with the default name _main.exe_ from main.dart
Couldn't find flag to set the name of executable on dart2native.
@kwalrath I suggest we remove the -o part from this page