mirror of
https://github.com/jkriege2/JKQtPlotter.git
synced 2024-12-26 02:21:43 +08:00
using Qt's dllexport/import-macros
This commit is contained in:
parent
d51d47b2f4
commit
725d19d616
@ -1,7 +1,6 @@
|
|||||||
#ifndef jkqtcommon_IMPORT_H
|
#ifndef jkqtcommon_IMPORT_H
|
||||||
#define jkqtcommon_IMPORT_H
|
#define jkqtcommon_IMPORT_H
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright (c) 2008-2020 Jan W. Krieger (<jan@jkrieger.de>)
|
Copyright (c) 2008-2020 Jan W. Krieger (<jan@jkrieger.de>)
|
||||||
|
|
||||||
@ -39,7 +38,7 @@
|
|||||||
JKQTCOMMON_LIB_EXPORT void exportedFunctionName();
|
JKQTCOMMON_LIB_EXPORT void exportedFunctionName();
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
These macros append the appropriate \c __declspec(dllexport) and \c __declspec(dllimport)
|
These macros append the appropriate \c Q_DECL_EXPORT and \c Q_DECL_IMPORT
|
||||||
to the function/class body and thus tell windows compilers to export these sysmbols from
|
to the function/class body and thus tell windows compilers to export these sysmbols from
|
||||||
the shared library, or import them from a shared library.
|
the shared library, or import them from a shared library.
|
||||||
|
|
||||||
@ -72,21 +71,15 @@
|
|||||||
compiling an application), the symbols are imported
|
compiling an application), the symbols are imported
|
||||||
*/
|
*/
|
||||||
|
|
||||||
# ifndef __WINDOWS__
|
#include <QtCore/QtGlobal>
|
||||||
# if defined(WIN32) || defined(WIN64) || defined(_MSC_VER) || defined(_WIN32)
|
|
||||||
# define __WINDOWS__
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
|
|
||||||
#ifdef __WINDOWS__
|
|
||||||
# ifdef JKQTCOMMON_LIB_IN_DLL
|
# ifdef JKQTCOMMON_LIB_IN_DLL
|
||||||
# ifndef JKQTCOMMON_LIB_EXPORT
|
# ifndef JKQTCOMMON_LIB_EXPORT
|
||||||
# ifdef JKQTCOMMON_LIB_EXPORT_LIBRARY
|
# ifdef JKQTCOMMON_LIB_EXPORT_LIBRARY
|
||||||
/* We are building this library */
|
/* We are building this library */
|
||||||
# define JKQTCOMMON_LIB_EXPORT __declspec(dllexport)
|
# define JKQTCOMMON_LIB_EXPORT Q_DECL_EXPORT
|
||||||
# else
|
# else
|
||||||
/* We are using this library */
|
/* We are using this library */
|
||||||
# define JKQTCOMMON_LIB_EXPORT __declspec(dllimport)
|
# define JKQTCOMMON_LIB_EXPORT Q_DECL_IMPORT
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
# else
|
# else
|
||||||
@ -94,13 +87,6 @@
|
|||||||
# define JKQTCOMMON_LIB_EXPORT
|
# define JKQTCOMMON_LIB_EXPORT
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
#else
|
|
||||||
# define JKQTCOMMON_LIB_EXPORT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
JKQTFASTPLOTTER_LIB_EXPORT void exportedFunctionName();
|
JKQTFASTPLOTTER_LIB_EXPORT void exportedFunctionName();
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
These macros append the appropriate \c __declspec(dllexport) and \c __declspec(dllimport)
|
These macros append the appropriate \c Q_DECL_EXPORT and \c Q_DECL_IMPORT
|
||||||
to the function/class body and thus tell windows compilers to export these sysmbols from
|
to the function/class body and thus tell windows compilers to export these sysmbols from
|
||||||
the shared library, or import them from a shared library.
|
the shared library, or import them from a shared library.
|
||||||
|
|
||||||
@ -72,6 +72,8 @@
|
|||||||
compiling an application), the symbols are imported
|
compiling an application), the symbols are imported
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <QtCore/QtGlobal>
|
||||||
|
|
||||||
# ifndef __WINDOWS__
|
# ifndef __WINDOWS__
|
||||||
# if defined(WIN32) || defined(WIN64) || defined(_MSC_VER) || defined(_WIN32)
|
# if defined(WIN32) || defined(WIN64) || defined(_MSC_VER) || defined(_WIN32)
|
||||||
# define __WINDOWS__
|
# define __WINDOWS__
|
||||||
@ -83,10 +85,10 @@
|
|||||||
# ifndef JKQTFASTPLOTTER_LIB_EXPORT
|
# ifndef JKQTFASTPLOTTER_LIB_EXPORT
|
||||||
# ifdef JKQTFASTPLOTTER_LIB_EXPORT_LIBRARY
|
# ifdef JKQTFASTPLOTTER_LIB_EXPORT_LIBRARY
|
||||||
/* We are building this library */
|
/* We are building this library */
|
||||||
# define JKQTFASTPLOTTER_LIB_EXPORT __declspec(dllexport)
|
# define JKQTFASTPLOTTER_LIB_EXPORT Q_DECL_EXPORT
|
||||||
# else
|
# else
|
||||||
/* We are using this library */
|
/* We are using this library */
|
||||||
# define JKQTFASTPLOTTER_LIB_EXPORT __declspec(dllimport)
|
# define JKQTFASTPLOTTER_LIB_EXPORT Q_DECL_IMPORT
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
# else
|
# else
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
JKQTMATHTEXT_LIB_EXPORT void exportedFunctionName();
|
JKQTMATHTEXT_LIB_EXPORT void exportedFunctionName();
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
These macros append the appropriate \c __declspec(dllexport) and \c __declspec(dllimport)
|
These macros append the appropriate \c Q_DECL_EXPORT and \c Q_DECL_IMPORT
|
||||||
to the function/class body and thus tell windows compilers to export these sysmbols from
|
to the function/class body and thus tell windows compilers to export these sysmbols from
|
||||||
the shared library, or import them from a shared library.
|
the shared library, or import them from a shared library.
|
||||||
|
|
||||||
@ -72,6 +72,8 @@
|
|||||||
compiling an application), the symbols are imported
|
compiling an application), the symbols are imported
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <QtCore/QtGlobal>
|
||||||
|
|
||||||
# ifndef __WINDOWS__
|
# ifndef __WINDOWS__
|
||||||
# if defined(WIN32) || defined(WIN64) || defined(_MSC_VER) || defined(_WIN32)
|
# if defined(WIN32) || defined(WIN64) || defined(_MSC_VER) || defined(_WIN32)
|
||||||
# define __WINDOWS__
|
# define __WINDOWS__
|
||||||
@ -83,10 +85,10 @@
|
|||||||
# ifndef JKQTMATHTEXT_LIB_EXPORT
|
# ifndef JKQTMATHTEXT_LIB_EXPORT
|
||||||
# ifdef JKQTMATHTEXT_LIB_EXPORT_LIBRARY
|
# ifdef JKQTMATHTEXT_LIB_EXPORT_LIBRARY
|
||||||
/* We are building this library */
|
/* We are building this library */
|
||||||
# define JKQTMATHTEXT_LIB_EXPORT __declspec(dllexport)
|
# define JKQTMATHTEXT_LIB_EXPORT Q_DECL_EXPORT
|
||||||
# else
|
# else
|
||||||
/* We are using this library */
|
/* We are using this library */
|
||||||
# define JKQTMATHTEXT_LIB_EXPORT __declspec(dllimport)
|
# define JKQTMATHTEXT_LIB_EXPORT Q_DECL_IMPORT
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
# else
|
# else
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
JKQTPLOTTER_LIB_EXPORT void exportedFunctionName();
|
JKQTPLOTTER_LIB_EXPORT void exportedFunctionName();
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
These macros append the appropriate \c __declspec(dllexport) and \c __declspec(dllimport)
|
These macros append the appropriate \c Q_DECL_EXPORT and \c Q_DECL_IMPORT
|
||||||
to the function/class body and thus tell windows compilers to export these sysmbols from
|
to the function/class body and thus tell windows compilers to export these sysmbols from
|
||||||
the shared library, or import them from a shared library.
|
the shared library, or import them from a shared library.
|
||||||
|
|
||||||
@ -72,21 +72,16 @@
|
|||||||
compiling an application), the symbols are imported
|
compiling an application), the symbols are imported
|
||||||
*/
|
*/
|
||||||
|
|
||||||
# ifndef __WINDOWS__
|
#include <QtCore/QtGlobal>
|
||||||
# if defined(WIN32) || defined(WIN64) || defined(_MSC_VER) || defined(_WIN32)
|
|
||||||
# define __WINDOWS__
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
|
|
||||||
#ifdef __WINDOWS__
|
|
||||||
# ifdef JKQTPLOTTER_LIB_IN_DLL
|
# ifdef JKQTPLOTTER_LIB_IN_DLL
|
||||||
# ifndef JKQTPLOTTER_LIB_EXPORT
|
# ifndef JKQTPLOTTER_LIB_EXPORT
|
||||||
# ifdef JKQTPLOTTER_LIB_EXPORT_LIBRARY
|
# ifdef JKQTPLOTTER_LIB_EXPORT_LIBRARY
|
||||||
/* We are building this library */
|
/* We are building this library */
|
||||||
# define JKQTPLOTTER_LIB_EXPORT __declspec(dllexport)
|
# define JKQTPLOTTER_LIB_EXPORT Q_DECL_EXPORT
|
||||||
# else
|
# else
|
||||||
/* We are using this library */
|
/* We are using this library */
|
||||||
# define JKQTPLOTTER_LIB_EXPORT __declspec(dllimport)
|
# define JKQTPLOTTER_LIB_EXPORT Q_DECL_IMPORT
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
# else
|
# else
|
||||||
@ -94,10 +89,6 @@
|
|||||||
# define JKQTPLOTTER_LIB_EXPORT
|
# define JKQTPLOTTER_LIB_EXPORT
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
#else
|
|
||||||
# define JKQTPLOTTER_LIB_EXPORT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user