CreOS SDK
The CreOS SDK allows you to interact with Avular robots
Loading...
Searching...
No Matches
utils_global.hpp
1
// Copyright (C) 2024 Avular Holding B.V. - All Rights Reserved
2
// You may use this code under the terms of the Avular
3
// Software End-User License Agreement.
4
//
5
// You should have received a copy of the Avular
6
// Software End-User License Agreement license with
7
// this file, or download it from: avular.com/eula
8
//
9
/*****************************************************************************
10
* Created on: 2024 June 19
11
* Author: Robbert-Jan de Jager
12
*
13
* Common header file for the CreOS library.
14
****************************************************************************/
15
#pragma once
16
17
// Define the export/import macro for the library
18
// Shared libraries on linux by default export all symbols. This can cause
19
// problems when linking with other shared libraries that have the same symbol
20
// names. To prevent this, we use the visibility attribute to only export the
21
// symbols that we want to export.
22
// On Windows, this is the default behavior.
23
// The CREOS_UTILS_API macro must be added to all classes and functions that
24
// need to be exported from the library. This macro will set the visibility of
25
// the symbol to be public.
26
// In practice when building the library we must export the symbol, but users
27
// of the library must import the symbol. The CREOS_UTILS_EXPORTS macro
28
// controls this behavior.
29
30
#ifdef WIN32
31
32
#ifdef CREOS_UTILS_EXPORTS
33
#define CREOS_UTILS_API __declspec(dllexport)
34
#else
35
#define CREOS_UTILS_API __declspec(dllimport)
36
#endif
37
38
#else
39
40
#ifdef CREOS_UTILS_EXPORTS
41
#define CREOS_UTILS_API __attribute__((visibility("default")))
42
#else
43
#define CREOS_UTILS_API
44
#endif
45
46
#endif
creos_utils
include
creos
utils_global.hpp
Generated by
1.12.0