Is there a macro for the output directory on msvc?

This page summarizes the projects mentioned and recommended in the original post on /r/cpp_questions

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • jarro2783/cxxopts

    Lightweight C++ command line option parser

  • Let the user pass the path/filename as an input argument to the program. Your main() function takes arguments from the console, so you could invoke your program as .\my_program --err_log "\path\to\my_errors.log". Of course this again only works if executed from the console - you can however create a desktop shortcut that invokes your program with this argument and you can also configure your IDE to pass this argument when running your program. To make parsing input arguments easier, use a library such as cxxopts

  • whereami

    Locate the current running executable and the current running module/library on the file system 🔎 (by gpakosz)

  • Find the path of the executable and save the file relative to this. This is beyond standard C++ and you have to use the API of the Operating System. There is luckily some people that made cross platform libraries for this, such as whereami.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts