Actin  Version 5.5.5
Software for Robotics Simulation and Control
ecConfig.h
Go to the documentation of this file.
1 #ifndef ecConfig_H_
2 #define ecConfig_H_
3 //------------------------------------------------------------------------------
4 // Copyright (c) 2008-2013 Energid Technologies. All rights reserved.
5 //
9 //
10 //------------------------------------------------------------------------------
11 
12 #include <foundCore/ecBuildConfig.h>
13 
15 #ifndef EC_STATIC_BUILD
16 # define ECBOOST_ALL_DYN_LINK 1
17 #endif
18 
19 #if defined(WIN32)
20 # define EC_DECL_ALIGN_16 __declspec(align(16))
22 # define EC_DECL_IMPORTS __declspec(dllimport)
24 # define EC_DECL_EXPORTS __declspec(dllexport)
26 // Visual Studio-specific warnings to disable
27 # ifdef _MSC_VER
28 # pragma warning(disable:4251) // exporting stl objects within a dll
29 # pragma warning(disable:4275) // non dll-interface class used as base off dll-interface class
30 # pragma warning(disable:4661) // no suitable definition provided for explicit template instantiation request
31 #endif
32 
33 // General Windows definitions.
34 # ifndef NOMINMAX
35 # define NOMINMAX
36 # endif
37 # define _SCL_SECURE_NO_WARNINGS
38 # define _CRT_SECURE_NO_DEPRECATE
39 # ifndef WIN32_LEAN_AND_MEAN
40 # define WIN32_LEAN_AND_MEAN
41 # endif
42 # ifndef _WIN32_WINNT
43 # define _WIN32_WINNT 0x0600 // Windows Vista (XP is not longer supported by Microsoft)
44 # endif
45 # define DATE_TIME_INLINE 1
46 # define ECBOOST_ALL_NO_LIB 1
47 // NOTE: Unicode support moved out of here since it may cause conflicts with external user code.
48 
50 # if defined(_DEBUG) && !defined(RTOS_32)
51 # include <stdlib.h>
52 # include <crtdbg.h>
54 # define EC_DEBUG_FLAGS _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF|_CRTDBG_LEAK_CHECK_DF)
55 # else
56 # define EC_DEBUG_FLAGS
58 # endif
59 
61 #ifdef RTOS_32
62  void EcRTOS32Initialize();
64 # define EC_RTKERNEL_INIT EcRTOS32Initialize()
65 # ifdef EC_RTFDRVUSBDISK
66  extern "C" void EcRTOS32FindUSBControllers();
68 # define EC_RTUSB_INIT EcRTOS32FindUSBControllers()
69 # else
70 # define EC_RTUSB_INIT
71 # endif
72 #else
73 # define EC_RTKERNEL_INIT
74 # define EC_RTUSB_INIT
75 #endif
76 
77 // Always build foundCore and plugins shared to handle printing and plugin support properly.
78 # if !defined(EC_BUILD_SHARED_LIBS) && !defined(EC_STATIC_BUILD)
79 # define EC_STABLE_FOUNDCORE_DYNAMIC_LIBS
80 # define EC_STABLE_SOCKET_DYNAMIC_LIBS
81 # define EC_ACTIN_HWPLUGIN_DYNAMIC_LIBS
82 # define EC_ACTIN_PLUGINS_DYNAMIC_LIBS
83 # define EC_GUICOMMON_SLOTMANAGER_DYNAMIC_LIBS
84 # define EC_GUICOMMON_VIEWERCORE_DYNAMIC_LIBS
85 # endif // EC_BUILD_SHARED_LIBS
86 #else // defined(WIN32)
87 // All other non-Windows platforms
88 # define EC_DECL_ALIGN_16
89 # define EC_DECL_IMPORTS
90 # define EC_DECL_EXPORTS
91 # define EC_DEBUG_FLAGS
92 # define EC_RTKERNEL_INIT
93 # define EC_RTUSB_INIT
94 
95 // Fix for debian-sarge (gcc 3.3.X) boost_thread support
96 # if defined(__gnu_linux__) && defined(__GNUC__) && (__GNUC__ == 3) && (__GNUC_MINOR__ == 3)
97 # define _PTHREADS
98 # endif
99 #endif // defined(WIN32)
100 
102 #if defined(EC_BUILD_SHARED_LIBS)
103 # define EC_FOUNDATION_GEOMETRY_DYNAMIC_LIBS
104 # define EC_STABLE_EXCELXML_DYNAMIC_LIBS
105 # define EC_STABLE_FILTERSTREAM_DYNAMIC_LIBS
106 # define EC_STABLE_FOUNDCORE_DYNAMIC_LIBS
107 # define EC_STABLE_MATRIXUTILITIES_DYNAMIC_LIBS
108 # define EC_STABLE_SERIAL_DYNAMIC_LIBS
109 # define EC_STABLE_SOCKET_DYNAMIC_LIBS
110 # define EC_STABLE_ECCURL_DYNAMIC_LIBS
111 # define EC_STABLE_STREAM_DYNAMIC_LIBS
112 # define EC_STABLE_XML_DYNAMIC_LIBS
113 # define EC_STABLE_XMLREADERWRITER_DYNAMIC_LIBS
114 # define EC_STABLE_OSTOOLS_DYNAMIC_LIBS
115 #endif // defined(EC_BUILD_SHARED_LIBS)
116 
118 #if defined(EC_STABLE_EXCELXML_DYNAMIC_LIBS)
119 # if defined(stableFoundation_excelXml_EXPORTS)
120 # define EC_STABLE_EXCELXML_DECL EC_DECL_EXPORTS
121 # else
122 # define EC_STABLE_EXCELXML_DECL EC_DECL_IMPORTS
123 # endif
124 #else // defined(EC_STABLE_EXCELXML_DYNAMIC_LIBS)
125 # define EC_STABLE_EXCELXML_DECL
126 #endif // defined(EC_STABLE_EXCELXML_DYNAMIC_LIBS)
127 
129 #if defined(EC_STABLE_FILTERSTREAM_DYNAMIC_LIBS)
130 # if defined(stableFoundation_filterStream_EXPORTS)
131 # define EC_STABLE_FILTERSTREAM_DECL EC_DECL_EXPORTS
132 # else
133 # define EC_STABLE_FILTERSTREAM_DECL EC_DECL_IMPORTS
134 # endif
135 #else // defined(EC_STABLE_FILTERSTREAM_DYNAMIC_LIBS)
136 # define EC_STABLE_FILTERSTREAM_DECL
137 #endif // defined(EC_STABLE_FILTERSTREAM_DYNAMIC_LIBS)
138 
140 #if defined(EC_STABLE_FOUNDCORE_DYNAMIC_LIBS)
141 # if defined(stableFoundation_foundCore_EXPORTS)
142 # define EC_STABLE_FOUNDCORE_DECL EC_DECL_EXPORTS
143 # define EC_STABLE_FOUNDCORE_PRETEMPLATE_DECL extern
144 # else
145 # define EC_STABLE_FOUNDCORE_DECL EC_DECL_IMPORTS
146 # define EC_STABLE_FOUNDCORE_PRETEMPLATE_DECL
147 # endif
148 #else // defined(EC_STABLE_FOUNDCORE_DYNAMIC_LIBS)
149 # define EC_STABLE_FOUNDCORE_DECL
150 # define EC_STABLE_FOUNDCORE_PRETEMPLATE_DECL
151 #endif // defined(EC_STABLE_FOUNDCORE_DYNAMIC_LIBS)
152 
154 #if defined(EC_STABLE_MATRIXUTILITIES_DYNAMIC_LIBS)
155 # if defined(stableFoundation_matrixUtilities_EXPORTS)
156 # define EC_STABLE_MATRIXUTILITIES_DECL EC_DECL_EXPORTS
157 # else
158 # define EC_STABLE_MATRIXUTILITIES_DECL EC_DECL_IMPORTS
159 # endif
160 #else // defined(EC_STABLE_MATRIXUTILITIES_DYNAMIC_LIBS)
161 # define EC_STABLE_MATRIXUTILITIES_DECL
162 #endif // defined(EC_STABLE_MATRIXUTILITIES_DYNAMIC_LIBS)
163 
165 #if defined(EC_STABLE_SERIAL_DYNAMIC_LIBS)
166 # if defined(stableFoundation_serial_EXPORTS)
167 # define EC_STABLE_SERIAL_DECL EC_DECL_EXPORTS
168 # else
169 # define EC_STABLE_SERIAL_DECL EC_DECL_IMPORTS
170 # endif
171 #else // defined(EC_STABLE_SERIAL_DYNAMIC_LIBS)
172 # define EC_STABLE_SERIAL_DECL
173 #endif // defined(EC_STABLE_SERIAL_DYNAMIC_LIBS)
174 
176 #if defined(EC_STABLE_SOCKET_DYNAMIC_LIBS)
177 # if defined(stableFoundation_socket_EXPORTS)
178 # define EC_STABLE_SOCKET_DECL EC_DECL_EXPORTS
179 # else
180 # define EC_STABLE_SOCKET_DECL EC_DECL_IMPORTS
181 # endif
182 #else // defined(EC_STABLE_SOCKET_DYNAMIC_LIBS)
183 # define EC_STABLE_SOCKET_DECL
184 #endif // defined(EC_STABLE_SOCKET_DYNAMIC_LIBS)
185 
187 #if defined(EC_STABLE_ECCURL_DYNAMIC_LIBS)
188 # if defined(stableFoundation_ecCurl_EXPORTS)
189 # define EC_STABLE_ECCURL_DECL EC_DECL_EXPORTS
190 # else
191 # define EC_STABLE_ECCURL_DECL EC_DECL_IMPORTS
192 # endif
193 #else // defined(EC_STABLE_ECCURL_DYNAMIC_LIBS)
194 # define EC_STABLE_ECCURL_DECL
195 #endif // defined(EC_STABLE_ECCURL_DYNAMIC_LIBS)
196 
198 #if defined(EC_STABLE_STREAM_DYNAMIC_LIBS)
199 # if defined(stableFoundation_stream_EXPORTS)
200 # define EC_STABLE_STREAM_DECL EC_DECL_EXPORTS
201 # else
202 # define EC_STABLE_STREAM_DECL EC_DECL_IMPORTS
203 # endif
204 #else // defined(EC_STABLE_STREAM_DYNAMIC_LIBS)
205 # define EC_STABLE_STREAM_DECL
206 #endif // defined(EC_STABLE_STREAM_DYNAMIC_LIBS)
207 
209 #if defined(EC_STABLE_XML_DYNAMIC_LIBS)
210 # if defined(stableFoundation_xml_EXPORTS)
211 # define EC_STABLE_XML_DECL EC_DECL_EXPORTS
212 # define EC_STABLE_XML_TEMPLATE_DECL
214 # else
215 # define EC_STABLE_XML_DECL EC_DECL_IMPORTS
216 # define EC_STABLE_XML_TEMPLATE_DECL extern
218 # endif
219 #else // defined(EC_STABLE_XML_DYNAMIC_LIBS)
220 # define EC_STABLE_XML_DECL
221 # define EC_STABLE_XML_TEMPLATE_DECL
223 #endif // defined(EC_STABLE_XML_DYNAMIC_LIBS)
224 
225 #if defined(EC_STABLE_XMLREADERWRITER_DYNAMIC_LIBS)
226 # if defined(stableFoundation_xmlReaderWriter_EXPORTS)
227 # define EC_STABLE_XMLREADERWRITER_DECL EC_DECL_EXPORTS
229 # else
230 # define EC_STABLE_XMLREADERWRITER_DECL EC_DECL_IMPORTS
232 # endif
233 #else // defined(EC_STABLE_XMLREADERWRITER_DYNAMIC_LIBS)
234 # define EC_STABLE_XMLREADERWRITER_DECL
236 #endif // defined(EC_STABLE_XMLREADERWRITER_DYNAMIC_LIBS)
237 
239 #if defined(EC_STABLE_OSTOOLS_DYNAMIC_LIBS)
240 # if defined(stableFoundation_ostools_EXPORTS)
241 # define EC_STABLE_OSTOOLS_DECL EC_DECL_EXPORTS
242 # else
243 # define EC_STABLE_OSTOOLS_DECL EC_DECL_IMPORTS
244 # endif
245 #else // defined(EC_STABLE_OSTOOLS_DYNAMIC_LIBS)
246 # define EC_STABLE_OSTOOLS_DECL
247 #endif // defined(EC_STABLE_OSTOOLS_DYNAMIC_LIBS)
248 
249 
250 #endif // ecConfig_H_