c++ - Compiler Libraries vs. Operating System Libraries -


i noticed both compiler (mingw) , windows 8 sdk come same libraries, save naming conventions (i.e. win32.lib on windows 8 sdk libwin32.a in mingw libraries).

  • do compilers come libraries such these?
  • are these libraries multiple operating systems?
  • what difference (if any) between libraries come windows 8 sdk , come compiler?

there 2 kinds of libraries:

  • import libraries:
    these libraries list find references variables/functions/etc., don't contain code itself.

  • "normal" libraries (which contain object files contain machine code):
    these libraries contain object files, contain actual machine code.

the libraries ship operating system import libraries.
actual code, after all, in operating system itself; import libraries merely tell how use code provided in operating system.
why necessary? because there no way program "discover" libraries available on operating system while running, program has know available when compiled.

those come compiler code libraries; contain code compiler requires (which varies depending on particular compiler) in order comple program.

however, there no single "standard format" library; microsoft uses coff, *nix tools use elf.
when microsoft ships import libraries system, ships them in coff format, great visual c++ compiler -- not useful other compilers.

this causes compiler vendors such mingw forced create own import libraries operating systems intended target -- purpose of these libraries same as provided operating system vendor (such microsoft), format different.

that's why see seemingly similar libraries provided in multiple ways.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -