What is the difference/relationship between "extern" and "__declspec(dllimport")? I found that sometimes it is necessary to use both of them, sometimes one is enough.
Am I right that:
- "extern" is for statically linked libraries,
- "__declspec(dllimport)" is for DLL (dynamically linked libraries),
- both do actually the same job for their respective type of linking,
- you need to use both when you use import libraries (small .lib files that help linking with dll)?