Skip to content

Commit c2c2dec

Browse files
committed
fixing DLL API import error
1 parent 401e6d1 commit c2c2dec

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

includes/mlx.h

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
77
/* +#+#+#+#+#+ +#+ */
88
/* Created: 2022/10/04 16:56:35 by maldavid #+# #+# */
9-
/* Updated: 2023/12/11 19:45:15 by kbz_8 ### ########.fr */
9+
/* Updated: 2023/12/11 20:35:41 by kbz_8 ### ########.fr */
1010
/* */
1111
/* ************************************************************************** */
1212

@@ -17,16 +17,6 @@
1717

1818
#include "mlx_profile.h"
1919

20-
#ifdef MLX_COMPILER_MSVC
21-
#ifdef MLX_BUILD
22-
#define MLX_API __declspec(dllexport)
23-
#else
24-
#define MLX_IMPORT __declspec(dllimport)
25-
#endif
26-
#else
27-
#define MLX_API
28-
#endif
29-
3020
#ifdef __cplusplus
3121
extern "C" {
3222
#endif

includes/mlx_profile.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
77
/* +#+#+#+#+#+ +#+ */
88
/* Created: 2023/11/10 08:49:17 by maldavid #+# #+# */
9-
/* Updated: 2023/12/11 20:25:51 by kbz_8 ### ########.fr */
9+
/* Updated: 2023/12/11 20:35:57 by kbz_8 ### ########.fr */
1010
/* */
1111
/* ************************************************************************** */
1212

@@ -53,6 +53,16 @@
5353
#error "Unknown environment!"
5454
#endif
5555

56+
#ifdef MLX_COMPILER_MSVC
57+
#ifdef MLX_BUILD
58+
#define MLX_API __declspec(dllexport)
59+
#else
60+
#define MLX_API __declspec(dllimport)
61+
#endif
62+
#else
63+
#define MLX_API
64+
#endif
65+
5666
// Checking common assumptions
5767
#ifdef __cplusplus
5868
#include <climits>

0 commit comments

Comments
 (0)