C++ Utilities: application/global.h File Reference

C++ Utilities 5.34.0 Useful C++ classes and routines such as argument parser, IO and conversion utilities

Loading...
Searching...
No Matches
Macros
global.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Macros
#define | CPP_UTILITIES_GENERIC_LIB_EXPORT __attribute__((visibility("default")))
| Marks a symbol for shared library export.
#define | CPP_UTILITIES_GENERIC_LIB_IMPORT __attribute__((visibility("default")))
| Declares a symbol to be an import from a shared library.
#define | CPP_UTILITIES_GENERIC_LIB_HIDDEN __attribute__((visibility("hidden")))
| Hidden visibility indicates that the symbol will not be placed into the dynamic symbol table, so no other module (executable or shared library) can reference it directly.
#define | CPP_UTILITIES_MAIN_EXPORT
| Exports the main() functions on platforms where this is needed.
#define | CPP_UTILITIES_UNUSED(x)
| Prevents warnings about unused variables.
#define | CPP_UTILITIES_IF_DEBUG_BUILD(x)
| Wraps debug-only lines conveniently.

## Macro Definition Documentation

## ◆ CPP_UTILITIES_GENERIC_LIB_EXPORT

#define CPP_UTILITIES_GENERIC_LIB_EXPORT __attribute__((visibility("default")))

Marks a symbol for shared library export.

Definition at line 82 of file global.h.

## ◆ CPP_UTILITIES_GENERIC_LIB_HIDDEN

#define CPP_UTILITIES_GENERIC_LIB_HIDDEN __attribute__((visibility("hidden")))

Hidden visibility indicates that the symbol will not be placed into the dynamic symbol table, so no other module (executable or shared library) can reference it directly.

Definition at line 84 of file global.h.

## ◆ CPP_UTILITIES_GENERIC_LIB_IMPORT

#define CPP_UTILITIES_GENERIC_LIB_IMPORT __attribute__((visibility("default")))

Declares a symbol to be an import from a shared library.

Definition at line 83 of file global.h.

## ◆ CPP_UTILITIES_IF_DEBUG_BUILD

#define CPP_UTILITIES_IF_DEBUG_BUILD | ( |  | x | ) |

Wraps debug-only lines conveniently.

Definition at line 118 of file global.h.

## ◆ CPP_UTILITIES_MAIN_EXPORT

#define CPP_UTILITIES_MAIN_EXPORT

Exports the main() functions on platforms where this is needed.

Remarks
  Needed on Android with Qt where applications are shared libraries. Otherwise loading the app will fail with the error "dlsym failed: undefined symbol: main".

See also
  See qtbase commit 29b17fa335388c9b93f70c29b2398cf2fee65785 (where this is solved with the sledgehammer method of setting the default visibility).

Definition at line 100 of file global.h.

## ◆ CPP_UTILITIES_UNUSED

#define CPP_UTILITIES_UNUSED | ( |  | x | ) |

Value:
(void)x;

Prevents warnings about unused variables.

Definition at line 108 of file global.h.