YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
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
20namespace yarp {
21namespace os {
22namespace impl {
23
24#if defined(YARP_HAS_ACE)
25using ACE_OS::dlclose;
26using ACE_OS::dlerror;
27using ACE_OS::dlopen;
28using ACE_OS::dlsym;
29#elif defined(YARP_HAS_DLFCN_H)
30using ::dlclose;
31using ::dlerror;
32using ::dlopen;
33using ::dlsym;
34#else
35YARP_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:111