00001 // Magic Software, Inc. 00002 // http://www.magic-software.com 00003 // Copyright (c) 2000-2003. All Rights Reserved 00004 // 00005 // Source code from Magic Software is supplied under the terms of a license 00006 // agreement and may not be copied or disclosed except in accordance with the 00007 // terms of that agreement. The various license agreements may be found at 00008 // the Magic Software web site. This file is subject to the license 00009 // 00010 // FREE SOURCE CODE 00011 // http://www.magic-software.com/License/free.pdf 00012 00013 #ifndef MAGICFMLIBTYPE_H 00014 #define MAGICFMLIBTYPE_H 00015 00016 // Windows platform 00017 #ifdef _WIN32 00018 00019 // For the DLL library. 00020 #ifdef MAGICFMDLL_EXPORTS 00021 #define MAGICFM __declspec(dllexport) 00022 00023 // For a client of the DLL library. 00024 #else 00025 #ifdef MAGICFMDLL_IMPORTS 00026 #define MAGICFM __declspec(dllimport) 00027 00028 // For the static library. 00029 #else 00030 #define MAGICFM 00031 00032 #endif 00033 #endif 00034 00035 // Disable warning C4251. Template classes cannot be exported for the obvious 00036 // reason that the code is not generated until an instance of the class is 00037 // declared. With this warning enabled, you get many complaints about class 00038 // data members that are of template type. 00039 // 00040 // When developing the DLL code, you should enable the warning to catch places 00041 // where you should have used MAGICFM. For example, nested classes and friend 00042 // functions should be tagged with this macro. 00043 #pragma warning( disable : 4251 ) 00044 00045 // Disable warning C4275: "non dll-interface class 'someClass' used as base 00046 // for dll-interface class 'anotherClass'. The only time this warning occurs 00047 // in the DLL projects is when compiling MgcBinary2D, a class derived from 00048 // a template class. The DLL library works fine, so I disabled the warning. 00049 // You might want to enable it if you want to catch base classes that are 00050 // non-template and non-dll-interface when the derived class is dll-interface. 00051 #pragma warning( disable : 4275 ) 00052 00053 // Disable warning C4514. "unreferenced inline function has been removed" 00054 // This occurs a lot when you increase the warning level to 4. 00055 #pragma warning( disable : 4514 ) 00056 00057 // Disable warning C4127: "conditional expression is constant" 00058 // A few loops are controlled by "while (true) { 'break' somewhere }". 00059 #pragma warning( disable : 4127 ) 00060 00061 // Disable warning C4097: "typedef-name 'someType' used as synonym for 00062 // class-name 'someTemplateType'. Occurs when a base class for a derived 00063 // class is a typedef'd name for a template type. This only occurs when 00064 // compiling MgcBinary2D. 00065 #pragma warning( disable : 4097 ) 00066 00067 // Disable the warning about truncating the debug names to 255 characters. 00068 // This warning shows up often with STL code. 00069 #pragma warning( disable : 4786 ) 00070 00071 // Warning C4702: "unreachable code". This is incorrectly generated at 00072 // Level 4 warnings in Release builds in the following situation: 00073 // 00074 // ret_type Function () 00075 // { 00076 // if ( condition ) 00077 // return a_value; 00078 // else 00079 // return another_value; 00080 // } <-- line at which the compiler complains 00081 00082 // Linux platform 00083 #else 00084 #define MAGICFM 00085 #endif 00086 00087 #endif 00088 00089