YARP
Yet Another Robot Platform
PlatformDlfcn.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3  * SPDX-License-Identifier: BSD-3-Clause
4  */
5 
6 #ifndef YARP_OS_IMPL_PLATFORMDLFCN_H
7 #define YARP_OS_IMPL_PLATFORMDLFCN_H
8 
9 #include <yarp/conf/system.h>
10 #if defined(YARP_HAS_ACE)
11 # include <ace/OS_NS_dlfcn.h>
12 // In one the ACE headers there is a definition of "main" for WIN32
13 # ifdef main
14 # undef main
15 # endif
16 #elif defined(YARP_HAS_DLFCN_H)
17 # include <dlfcn.h>
18 #endif
19 
20 namespace yarp {
21 namespace os {
22 namespace impl {
23 
24 #if defined(YARP_HAS_ACE)
25 using ACE_OS::dlclose;
26 using ACE_OS::dlerror;
27 using ACE_OS::dlopen;
28 using ACE_OS::dlsym;
29 #elif defined(YARP_HAS_DLFCN_H)
30 using ::dlclose;
31 using ::dlerror;
32 using ::dlopen;
33 using ::dlsym;
34 #else
35 YARP_COMPILER_WARNING("dlfcn.h not found on this platform")
36 #endif
37 
38 } // namespace impl
39 } // namespace os
40 } // namespace yarp
41 
42 #endif // YARP_OS_IMPL_PLATFORMDLFCN_H
The main, catch-all namespace for YARP.
Definition: dirs.h:16
#define YARP_COMPILER_WARNING(x)
Generate a warning at build time on supported compilers.
Definition: system.h:109