Fix dll exports so that raylib builds in visual studio again. (#2037)
This commit is contained in:
parent
bb2763cc1f
commit
33ed452439
2 changed files with 19 additions and 25 deletions
|
@ -83,11 +83,6 @@
|
||||||
|
|
||||||
#define RAYLIB_VERSION "4.0"
|
#define RAYLIB_VERSION "4.0"
|
||||||
|
|
||||||
// Function specifiers definition
|
|
||||||
#ifndef RLAPI
|
|
||||||
#define RLAPI // Functions defined as 'extern' by default (implicit specifiers)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Function specifiers in case library is build/used as a shared library (Windows)
|
// 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
|
// NOTE: Microsoft specifiers to tell compiler that symbols are imported/exported from a .dll
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
|
@ -95,7 +90,11 @@
|
||||||
#define RLAPI __declspec(dllexport) // We are building the library 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)
|
#elif defined(USE_LIBTYPE_SHARED)
|
||||||
#define RLAPI __declspec(dllimport) // We are using the library as a Win32 shared library (.dll)
|
#define RLAPI __declspec(dllimport) // We are using the library as a Win32 shared library (.dll)
|
||||||
|
#else
|
||||||
|
#define RLAPI // Functions defined as 'extern' by default (implicit specifiers)
|
||||||
#endif
|
#endif
|
||||||
|
#else
|
||||||
|
#define RLAPI // Functions defined as 'extern' by default (implicit specifiers)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|
|
@ -52,30 +52,25 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Function specifiers definition
|
// Function specifiers definition
|
||||||
#ifndef RMAPI
|
#if defined(RAYMATH_IMPLEMENTATION)
|
||||||
#if defined(RAYMATH_IMPLEMENTATION)
|
#if defined(_WIN32) && defined(BUILD_LIBTYPE_SHARED)
|
||||||
#define RMAPI extern inline // Functions defined as 'extern inline' by default
|
#define RMAPI __declspec(dllexport) extern inline // We are building raylib as a Win32 shared library (.dll).
|
||||||
|
#elif defined(_WIN32) && defined(USE_LIBTYPE_SHARED)
|
||||||
// Function specifiers in case library is build/used as a shared library (Windows)
|
#define RMAPI __declspec(dllimport) // We are using raylib as a Win32 shared library (.dll)
|
||||||
// NOTE: Microsoft specifiers to tell compiler that symbols are imported/exported from a .dll
|
|
||||||
#if defined(_WIN32)
|
|
||||||
#if defined(BUILD_LIBTYPE_SHARED)
|
|
||||||
#define RMAPI __declspec(dllexport) // We are building the library as a Win32 shared library (.dll)
|
|
||||||
#elif defined(USE_LIBTYPE_SHARED)
|
|
||||||
#define RMAPI __declspec(dllimport) // We are using the library as a Win32 shared library (.dll)
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#elif defined(RAYMATH_STATIC_INLINE)
|
|
||||||
#define RMAPI static inline // Functions may be inlined, no external out-of-line definition
|
|
||||||
#else
|
#else
|
||||||
#if defined(__TINYC__)
|
#define RMAPI extern inline // Provide external definition
|
||||||
#define RMAPI static inline // WARNING: Plain inline not supported by tinycc (See issue #435)
|
#endif
|
||||||
#else
|
#elif defined(RAYMATH_STATIC_INLINE)
|
||||||
#define RMAPI inline
|
#define RMAPI static inline // Functions may be inlined, no external out-of-line definition
|
||||||
#endif
|
#else
|
||||||
|
#if defined(__TINYC__)
|
||||||
|
#define RMAPI static inline // plain inline not supported by tinycc (See issue #435)
|
||||||
|
#else
|
||||||
|
#define RMAPI inline // Functions may be inlined or external definition used
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
// Defines and Macros
|
// Defines and Macros
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue