From c2c2dece61dde23e498ed9a484e70693b0175bbb Mon Sep 17 00:00:00 2001 From: Kbz-8 Date: Mon, 11 Dec 2023 20:36:21 +0100 Subject: [PATCH] fixing DLL API import error --- includes/mlx.h | 12 +----------- includes/mlx_profile.h | 12 +++++++++++- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/includes/mlx.h b/includes/mlx.h index 7225f6a..bab16ee 100644 --- a/includes/mlx.h +++ b/includes/mlx.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/04 16:56:35 by maldavid #+# #+# */ -/* Updated: 2023/12/11 19:45:15 by kbz_8 ### ########.fr */ +/* Updated: 2023/12/11 20:35:41 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ @@ -17,16 +17,6 @@ #include "mlx_profile.h" -#ifdef MLX_COMPILER_MSVC - #ifdef MLX_BUILD - #define MLX_API __declspec(dllexport) - #else - #define MLX_IMPORT __declspec(dllimport) - #endif -#else - #define MLX_API -#endif - #ifdef __cplusplus extern "C" { #endif diff --git a/includes/mlx_profile.h b/includes/mlx_profile.h index 107a45c..5f6f527 100644 --- a/includes/mlx_profile.h +++ b/includes/mlx_profile.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/10 08:49:17 by maldavid #+# #+# */ -/* Updated: 2023/12/11 20:25:51 by kbz_8 ### ########.fr */ +/* Updated: 2023/12/11 20:35:57 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ @@ -53,6 +53,16 @@ #error "Unknown environment!" #endif +#ifdef MLX_COMPILER_MSVC + #ifdef MLX_BUILD + #define MLX_API __declspec(dllexport) + #else + #define MLX_API __declspec(dllimport) + #endif +#else + #define MLX_API +#endif + // Checking common assumptions #ifdef __cplusplus #include