When we create a static library, we have to provide clients with 2 files:
- .h files
- .lib files
However, when we create a dynamic library, we must provide clients with 3 files:
- .h files
- .lib files (aka import files)
- .dll files
As far as I know, I cannot build a client app (such as a console app) that
- statically links against dynamic libraries
- dynamically links against static libraries
Question
When I build a simple console app as follows, for example:
#include <iostream>
int main()
{
std::cout << "Hello World!";
return 0;
}
The output (.exe file in this case) is self-contained. Does it mean that "all c++ standard libraries are static libraries" ?