MethanePowered / MethaneKit

🎲 Modern 3D graphics made simple with C++17 cross-platform framework and rendering abstraction API on top of DirectX 12, Metal & Vulkan
Apache License 2.0
846 stars 51 forks source link

Tutorials do not start on MacOS because of command line parsing error #23

Closed egorodet closed 5 years ago

egorodet commented 5 years ago

When macOS bundled application is launched from Finder, MacOS assigns it a unique process serial number (PSN) and passes it to application as a command line argument, for example "-psn_0_8423432" (see description on stack overflow). When cxxopts tries to parse command line with psn argument it throws OptionException "Argument ‘-psn_0_8423432’ starts with a - but has incorrect syntax". When application is started from Terminal by full path to executable inside bundle it works normally because there is no psn argument in command line options.

Related issue created on cxxopts project: https://github.com/jarro2783/cxxopts/issues/171