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