Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual studio 2015 default additional libraries

When I make an empty project in VS 2015 it automatically puts these libraries into "additional dependencies":

kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)

I have no idea what most of these are for, can they be safely removed?

like image 803
Andrewh Avatar asked Oct 11 '25 17:10

Andrewh


1 Answers

Many of them can be safely removed. Here's a quick rundown of what they are for:

  • kernel32 : Process and thread management, file and device I/O, memory allocation (keep this, the C and C++ runtime libraries and compiler-generated code uses it)
  • user32 : Window and menu management (keep this if using GUI, can remove for console apps) The base set of widgets (= predefined window classes, like buttons and checkboxes and scrollbars) are here.
  • gdi32 : Drawing (keep this if using custom rendered graphics, can remove if just using widgets)
  • comctl32 : Fancy new widgets, like trees, listviews, and progress bars
  • winspool : Advanced usage of printing beyond what GDI covers. I always remove it.
  • comdlg32 : Common dialogs, like Open and Save File Dialogs
  • advapi32 : Registry support, user account and access control, cryptography. I usually end up needing this one, your needs may differ.
  • shell32, shlwapi : Taskbar and notification tray UI and more helper functions, like predefined folders and path manipulation functions. Often useful, but many applications won't need it.
  • ole32, oleaut32 : OLE is the basis for ActiveX, DCOM, etc. Many of the newer OS APIs are COM objects, so you probably need to keep this.
  • uuid : Advanced OLE usage, probably not needed.
  • odbc32, odbccp32 : Database access using a very old and unfriendly API. I always remove these.

Italicized libraries are not in the default list, but more useful than half the ones that are.