MSVC/What I hate about MSVC

From Sidvind
Jump to: navigation, search

Standard library[edit]

  • the monolithic evil header: windows.h
  • Certain headers, like ws2tcpip.h, must be included before windows.h or the world will explode.
  • Missing support for z-length modifier (size_t) for printf and friends.
  • windows.h defines min, max, near, far, ERROR etc.
  • Missing stdint.h (even more problems when different third-party libraries uses different but similar definitions of the types provided by stdint.h, eg. including headers from two libraries may not work (sdl+ffmpeg for instance))
  • Since the addition of deprecating POSIX names for standard library routines (like strdup) makes targeting *nix, win32 and wince troublesome. I can live with the fact that targeting win32 makes it warn (possible to disable) but wince enforces it. To workaound this issue one must "#define snprintf _snprintf". Things would also be better if wince had the security enhanced version, that would at least give it some purpose.
  • Missing {,v}asprintf and v{,s,f}scanf.
  • Missing fmemopen and open_memstream[1], and even fopencookie/funopen[2].


  • Fail at detecting interproject dependencies, sometimes need multiple builds until succeeds. Probably related to multicore compiling (guessing that it doesn't wait until all targets are complete.)
  • Also for reasons unknown, sometimes closes all panels (solution explorer, output window, debug windows) but opens the breakpoint view floating in the middle of the screen. (The more instances of VS running increases the chance of this happening, moving a floating window to another monitor also increase the chance)
  • Doesn't handle multiple files with the same filename (in different directories), only compiles one of them, whichever comes first.
  • While it does detect external changes in files, the dependency tracker does not and will not rebuild the affected files until the file has been modified from within the IDE.
  • Does not preserve line-endings. It correctly detects which line-ending the file has but doesn't preserve it.


  • Missing support for C99.
  • Preprocessor missing #warning
  • No range-based for. (implemented in vs2012)
  • Variable-sized arrays (it is a gcc extension but a really useful one)
  • warning C4996: '_strdup': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strdup. See online help for details.
    So replacing strdup with _strdup didn't really help. Wonderful.