title: Cross-platform error message
body: <p>I want to display an error message when my C++ cross-platform (Windows, Linux, Mac) OpenGL application fails to initialize to let the user know what went wrong.</p>
  
  <p>My ideas so far:</p>
  
  <ol>
  <li>Write errors to std::cerr
  <ul>
  <li>Problem: Shell not displayed on Linux when not running from it</li>
  <li>Problem: Console always displayed on Windows, even if not needed (if compiled as console application)</li>
  </ul></li>
  <li>Use GUI library
  <ul>
  <li>Problem: Overkill since everything else will be displayed using OpenGL. I get the window/context using <a href="http://www.glfw.org/" rel="nofollow">GLFW</a>.</li>
  </ul></li>
  <li>Platform-specific implementations and #ifdef
  <ul>
  <li>Problem: I would rather not want to mess with native APIs and potentially have to expand support later</li>
  </ul></li>
  </ol>
  
  <p>How would you solve this?</p>