declspec

what does __declspec(dllimport) really mean?

只愿长相守 提交于 2019-11-26 10:14:32
问题 I saw the Qt source code like this: class Q_CORE_EXPORT QBasicAtomicInt { public: ... }; Which Q_CORE_EXPORT macro defines like below: define Q_DECL_IMPORT __declspec(dllimport) So what does __declspec(dllimport) really mean? 回答1: __declspec is a Microsoft-specific attribute that allows you to specify storage-class information. (Nitpicker's Corner: However, a number of other compiler vendors—e.g. GCC—now support this language extension for compatibility with the installed base of code that