REVIEWED: API functions specifiers

This commit is contained in:
raysan5 2021-10-05 18:33:41 +02:00
parent 9f4a839853
commit b972b8d324
4 changed files with 156 additions and 154 deletions

View file

@ -83,15 +83,18 @@
#define RAYLIB_VERSION "4.0"
// Function specifiers definition
#ifndef RLAPI
#define RLAPI // We are building or using rlgl as a static library (or Linux shared library)
#define RLAPI // Functions defined as 'extern' by default (implicit specifiers)
#endif
// Function specifiers in case library is build/used as a shared library (Windows)
// NOTE: Microsoft specifiers to tell compiler that symbols are imported/exported from a .dll
#if defined(_WIN32)
#if defined(BUILD_LIBTYPE_SHARED)
#define RLAPI __declspec(dllexport) // We are building raylib as a Win32 shared library (.dll)
#define RLAPI __declspec(dllexport) // We are building the library as a Win32 shared library (.dll)
#elif defined(USE_LIBTYPE_SHARED)
#define RLAPI __declspec(dllimport) // We are using raylib as a Win32 shared library (.dll)
#define RLAPI __declspec(dllimport) // We are using the library as a Win32 shared library (.dll)
#endif
#endif