Q_CORE_EXPORT macro that expands to different values depending on the context in which it is compiled.
Excerpt from this source:
#ifndef Q_DECL_EXPORT # ifdef Q_OS_WIN # define Q_DECL_EXPORT __declspec(dllexport) # elif defined(QT_VISIBILITY_AVAILABLE) # define Q_DECL_EXPORT __attribute__((visibility("default"))) # endif # ifndef Q_DECL_EXPORT # define Q_DECL_EXPORT # endif #endif #ifndef Q_DECL_IMPORT # ifdef Q_OS_WIN # define Q_DECL_IMPORT __declspec(dllimport) # else # define Q_DECL_IMPORT # endif #endif
These values ββ( __declspec(dllexport) , __attribute__((visibility("default"))) , etc.) are compiler-specific attributes that indicate the visibility of functions in dynamic libraries.
Mark rushakoff
source share