First of all, no matter what dependent libraries are called by the internal implementation of the template, the code generated by the template itself is statically linked. Because the target code of the template is generated instantly by the compiler at that time, the first two files are statically linked. Yes, the dependent things may exist in libstdc++ (libc++ or others), this part is dynamically linked Most of the things in the third file are standard IO and other things in C, these things exist in libc , is a dynamic link. .
Both iostream and string are templates, so there is actually no difference between static and dynamic. If you use symbols such as cout, fopen, etc., then you will need to provide static files, or ask the other party to install Visual C++ 2015 Redistribution
Prioritize dynamic linking. Under Linux, you can use ldd to check which dynamic libraries you depend on. If there is a dynamic library, it means that the static library is not linked in.
Can be static or dynamic. You can check your project's compilation and linking settings. For example, you can select "Multi-threaded static library" or "Multi-threaded DLL" in VC++.
First of all, no matter what dependent libraries are called by the internal implementation of the template, the code generated by the template itself is statically linked. Because the target code of the template is generated instantly by the compiler at that time, the first two files are statically linked. Yes, the dependent things may exist in libstdc++ (libc++ or others), this part is dynamically linked
Most of the things in the third file are standard IO and other things in C, these things exist in libc ,
is a dynamic link. .
Both iostream and string are templates, so there is actually no difference between static and dynamic. If you use symbols such as cout, fopen, etc., then you will need to provide static files, or ask the other party to install Visual C++ 2015 Redistribution
The first two are static links, and the third one is dynamic link.
Prioritize dynamic linking. Under Linux, you can use ldd to check which dynamic libraries you depend on. If there is a dynamic library, it means that the static library is not linked in.
Can be static or dynamic. You can check your project's compilation and linking settings. For example, you can select "Multi-threaded static library" or "Multi-threaded DLL" in VC++.