Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Viewer example closes at startup... #94

Closed
jquiver opened this issue Dec 12, 2020 · 2 comments
Closed

Viewer example closes at startup... #94

jquiver opened this issue Dec 12, 2020 · 2 comments

Comments

@jquiver
Copy link

jquiver commented Dec 12, 2020

Hi,
I can't get the viewer example to start on Windows, VS2019
When executing the .parse(argc, argv) the application exists with exit(1) without printing anything.
The exact part of the code where this is happening is here (checked with the debugger)

   Utility::Arguments args;
    args.addArgument("file").setHelp("file", "file to load")
        .addOption("importer", "AnySceneImporter").setHelp("importer", "importer plugin to use")
        .addSkippedPrefix("magnum", "engine-specific options")
        .setGlobalHelp("Displays a 3D scene file provided on command line.")
        .parse(arguments.argc, arguments.argv); 

An I missing some arguments when executing the application, if yes how to pass them?
Thansk!

Jquiver

@jquiver
Copy link
Author

jquiver commented Dec 12, 2020

solved, I was using the wrong version of magnum.
Great project, keep up the good work.

@jquiver jquiver closed this as completed Dec 12, 2020
@mosra
Copy link
Owner

mosra commented Dec 12, 2020

Hi,

just for the record, it should print something like

Missing command-line argument file
Usage:
  magnum-viewer [--magnum-...] [-h|--help] [--importer IMPORTER] [--] file

and you're expected to run it as magnum-viewer somefile.obj. However, assuming you're running from within VS, the "missing output" is probably due to mosra/corrade#79 -- the output is printed to standard error, but VS for some reason ignores that and displays only what was passed to OutputDebugString(). This is something I still need to fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants