ucommon  7.0.0
About: GNU uCommon C++ is a portable and optimized class framework for writing C++ applications that need to use threads and support concurrent synchronization, and that use sockets, XML parsing, object serialization, thread-optimized string and data structure classes, etc..
  Fossies Dox: ucommon-7.0.0.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

Loading...
Searching...
No Matches
export.h
Go to the documentation of this file.
1// Copyright (C) 2006-2014 David Sugar, Tycho Softworks.
2// Copyright (C) 2015 Cherokees of Idaho.
3//
4// This file is part of GNU uCommon C++.
5//
6// GNU uCommon C++ is free software: you can redistribute it and/or modify
7// it under the terms of the GNU Lesser General Public License as published
8// by the Free Software Foundation, either version 3 of the License, or
9// (at your option) any later version.
10//
11// GNU uCommon C++ is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14// GNU Lesser General Public License for more details.
15//
16// You should have received a copy of the GNU Lesser General Public License
17// along with GNU uCommon C++. If not, see <http://www.gnu.org/licenses/>.
18
19/**
20 * Export interfaces for library interfaces.
21 * This is a special header used when we have to build DLL's for dumb
22 * platforms which require explicit declaration of imports and exports.
23 * The real purpose is to include our local headers in a new library
24 * module with external headers referenced as imports, and then to define
25 * our own interfaces in our new library as exports. This allows native
26 * construction of new DLL's based on/that use ucommon on Microsoft Windows
27 * and perhaps for other similarly defective legacy platforms. Otherwise
28 * this header is not used at all, and not when building applications.
29 * @file ucommon/export.h
30 */
31
32#if defined(_MSC_VER) || defined(WIN32) || defined(_WIN32)
33#ifdef __EXPORT
34#undef __EXPORT
35#endif
36
37#ifdef __SHARED
38#undef __SHARED
39#endif
40
41#ifdef UCOMMON_STATIC
42#define __EXPORT
43#else
44#define __EXPORT __declspec(dllexport)
45#endif
46
47#if defined(UCOMMON_STATIC) || defined(UCOMMON_RUNTIME)
48#define __SHARED
49#else
50#define __SHARED __declspec(dllexport)
51#endif
52
53#endif
54