GDCM 3.2.1

gdcmWin32.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: GDCM (Grassroots DICOM). A DICOM library
4
5 Copyright (c) 2006-2011 Mathieu Malaterre
6 All rights reserved.
7 See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
8
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the above copyright notice for more information.
12
13=========================================================================*/
14
15#ifndef GDCMWIN32_H
16#define GDCMWIN32_H
17
18#if !defined(GDCMTYPES_H)
19#error you need to include gdcmTypes.h instead
20#endif
21//-----------------------------------------------------------------------------
22// http://gcc.gnu.org/wiki/Visibility
23#if defined(_WIN32) && defined(GDCM_BUILD_SHARED_LIBS)
24 #if (defined(gdcmCommon_EXPORTS) || defined(gdcmDICT_EXPORTS) || defined(gdcmDSED_EXPORTS) || defined(gdcmIOD_EXPORTS) || defined(gdcmMSFF_EXPORTS) || defined(gdcmMEXD_EXPORTS)|| defined(_gdcmswig_EXPORTS)) || defined(vtkgdcm_EXPORTS)
25 #define GDCM_EXPORT __declspec( dllexport )
26 #else
27 #define GDCM_EXPORT __declspec( dllimport )
28 #endif
29#else
30 #if __GNUC__ >= 4 && defined(GDCM_BUILD_SHARED_LIBS)
31 #define GDCM_EXPORT __attribute__ ((visibility ("default")))
32 #define GDCM_LOCAL __attribute__ ((visibility ("hidden")))
33 #else
34 #define GDCM_EXPORT
35 #endif
36#endif
37
38#if defined(GDCM_OVERRIDE_BROKEN_IMPLEMENTATION) && !defined(GDCM_FORCE_EXPORT)
39#undef GDCM_EXPORT
40#define GDCM_EXPORT
41#endif
42
43// In VTK 4.2 vtkWrapPython does not like anything other than VTK_*EXPORT
44// [ 86%] Generating vtkGDCMImageReaderPython.cxx
45// syntax error
46// *** SYNTAX ERROR found in parsing the header file /usr/local/src/gdcm2/tags/gdcm-2-0-11/Utilities/VTK/vtkGDCMImageReader.h before line 128***
47// make[2]: *** [Utilities/VTK/vtkGDCMImageReaderPython.cxx] Error 1
48// make[1]: *** [Utilities/VTK/CMakeFiles/vtkgdcmPythonD.dir/all] Error 2
49// make: *** [all] Error 2
50
51#if defined(VTK_MAJOR_VERSION) && ( VTK_MAJOR_VERSION == 4 )
52#undef VTK_EXPORT
53#define VTK_EXPORT GDCM_EXPORT
54#endif
55
56//-----------------------------------------------------------------------------
57//This is needed when compiling in debug mode
58#ifdef _MSC_VER
59// to allow construct such as: std::numeric_limits<int>::max() we need the following:
60// warning C4003: not enough actual parameters for macro 'max'
61#ifndef NOMINMAX
62 #define NOMINMAX
63#endif
64# pragma warning ( default : 4263 ) /* no override, call convention differs */
65// 'identifier' : class 'type' needs to have dll-interface to be used by
66// clients of class 'type2'
67#pragma warning ( disable : 4251 )
68// non dll-interface class 'type' used as base for dll-interface class 'type2'
69#pragma warning ( disable : 4275 )
70// 'identifier' : identifier was truncated to 'number' characters in the
71// debug information
72#pragma warning ( disable : 4786 )
73//'identifier' : decorated name length exceeded, name was truncated
74#pragma warning ( disable : 4503 )
75#endif //_MSC_VER
76
77//-----------------------------------------------------------------------------
78#endif //GDCMWIN32_H