BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
WinDllMacros.h File Reference

Description

Defines export/import macros for global data symbols.

Homepage:\n http://www.bornagainproject.org
License:\n GNU General Public License v3 or higher (see COPYING)
Authors
Scientific Computing Group at MLZ Garching

Definition in file WinDllMacros.h.

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define BA_CORE_API_
 Macro for export/import global data symbols (Windows only). Relevant for Windows only. In Linux/MAC, this macro is empty. More...
 
#define BA_DEVICE_API_
 Macro for export/import global data symbols (Windows only). Relevant for Windows only. In Linux/MAC, this macro is empty. More...
 

Macro Definition Documentation

◆ BA_CORE_API_

#define BA_CORE_API_

Macro for export/import global data symbols (Windows only). Relevant for Windows only. In Linux/MAC, this macro is empty.

In principle all exports are done with "export all symbols". This is defined in the CMake file BornAgain/Windows.cmake:

set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)

However, this is not sufficient for exported data symbols, see CMake documentation:

"[...]For global data symbols, __declspec(dllimport) must still be used when compiling against the code in the .dll. All other function symbols will be automatically exported and imported by callers."

For this reason, this macro still has to exist next to the named CMake property.

Definition at line 57 of file WinDllMacros.h.

◆ BA_DEVICE_API_

#define BA_DEVICE_API_

Macro for export/import global data symbols (Windows only). Relevant for Windows only. In Linux/MAC, this macro is empty.

In principle all exports are done with "export all symbols". This is defined in the CMake file BornAgain/Windows.cmake:

set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)

However, this is not sufficient for exported data symbols, see CMake documentation:

"[...]For global data symbols, __declspec(dllimport) must still be used when compiling against the code in the .dll. All other function symbols will be automatically exported and imported by callers."

For this reason, this macro still has to exist next to the named CMake property.

Definition at line 56 of file WinDllMacros.h.