FastLED 3.9.15
Loading...
Searching...
No Matches
export.h
Go to the documentation of this file.
1#pragma once
2
5
6#ifndef FASTLED_EXPORT
7 #if defined(FL_IS_WASM)
8 // IWYU pragma: begin_keep
9#include <emscripten.h>
10// IWYU pragma: end_keep
11 #define FASTLED_EXPORT EMSCRIPTEN_KEEPALIVE
12 #elif defined(_WIN32) || defined(_WIN64)
13 // Windows DLL export/import
14 #ifdef FASTLED_BUILDING_DLL
15 #define FASTLED_EXPORT __declspec(dllexport)
16 #else
17 #define FASTLED_EXPORT __declspec(dllimport)
18 #endif
19 #elif defined(__GNUC__) && (__GNUC__ >= 4)
20 // GCC/Clang visibility attributes
21 #define FASTLED_EXPORT __attribute__((visibility("default")))
22 #elif defined(__SUNPRO_CC) && (__SUNPRO_CC >= 0x550)
23 // Sun Studio visibility attributes
24 #define FASTLED_EXPORT __global
25 #else
26 // Fallback for other platforms
27 #define FASTLED_EXPORT
28 #endif
29#endif
30
31#ifndef FASTLED_CALL
32 #if defined(_WIN32) || defined(_WIN64)
33 // Windows calling convention
34 #define FASTLED_CALL __stdcall
35 #else
36 // Unix-like platforms - no special calling convention
37 #define FASTLED_CALL
38 #endif
39#endif
40
42#define FASTLED_API FASTLED_EXPORT FASTLED_CALL
43
44// FL_KEEP_ALIVE is now defined in fl/compiler_control.h