Skip to content

Commit 19ce912

Browse files
committed
adding symbols to dll on windows
1 parent 890e301 commit 19ce912

File tree

5 files changed

+28
-9
lines changed

5 files changed

+28
-9
lines changed

src/core/application.h

Lines changed: 3 additions & 2 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 21:49:46 by maldavid #+# #+# */
9-
/* Updated: 2023/11/23 14:25:43 by maldavid ### ########.fr */
9+
/* Updated: 2023/12/08 18:52:47 by kbz_8 ### ########.fr */
1010
/* */
1111
/* ************************************************************************** */
1212

@@ -24,10 +24,11 @@
2424

2525
#include <core/graphics.h>
2626
#include <platform/inputs.h>
27+
#include <core/profile.h>
2728

2829
namespace mlx::core
2930
{
30-
class Application
31+
class MLX_API Application
3132
{
3233
public:
3334
Application();

src/core/errors.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@
66
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
77
/* +#+#+#+#+#+ +#+ */
88
/* Created: 2022/10/04 17:42:32 by maldavid #+# #+# */
9-
/* Updated: 2022/10/08 19:06:41 by maldavid ### ########.fr */
9+
/* Updated: 2023/12/08 18:53:11 by kbz_8 ### ########.fr */
1010
/* */
1111
/* ************************************************************************** */
1212

1313
#ifndef __MLX_ERRORS__
1414
#define __MLX_ERRORS__
1515

1616
#include <string>
17+
#include <core/profile.h>
1718

1819
enum class e_kind
1920
{
@@ -25,7 +26,7 @@ enum class e_kind
2526

2627
namespace mlx::core::error
2728
{
28-
void report(e_kind kind, std::string msg, ...);
29+
void MLX_API report(e_kind kind, std::string msg, ...);
2930
}
3031

3132
#endif // __MLX_ERRORS__

src/core/profile.h

Lines changed: 15 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/11/10 09:05:56 by maldavid ### ########.fr */
9+
/* Updated: 2023/12/08 18:49:38 by kbz_8 ### ########.fr */
1010
/* */
1111
/* ************************************************************************** */
1212

@@ -41,6 +41,20 @@
4141
#warning "This compiler is not fully supported"
4242
#endif
4343

44+
#if defined(_WIN32) || defined(_WIN64)
45+
#define MLX_EXPORT __declspec(dllexport)
46+
#define MLX_IMPORT __declspec(dllexport)
47+
#else
48+
#define MLX_EXPORT
49+
#define MLX_IMPORT
50+
#endif
51+
52+
#ifdef MLX_BUILD
53+
#define MLX_API MLX_EXPORT
54+
#else
55+
#define MLX_API MLX_IMPORT
56+
#endif
57+
4458
// Checking common assumptions
4559
#include <climits>
4660
#include <cstdint>

src/platform/inputs.h

Lines changed: 4 additions & 2 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/05 16:27:35 by maldavid #+# #+# */
9-
/* Updated: 2023/12/08 12:14:39 by kbz_8 ### ########.fr */
9+
/* Updated: 2023/12/08 18:54:03 by kbz_8 ### ########.fr */
1010
/* */
1111
/* ************************************************************************** */
1212

@@ -18,6 +18,8 @@
1818
#include <SDL2/SDL.h>
1919
#include <unordered_map>
2020

21+
#include <core/profile.h>
22+
2123
#include "window.h"
2224

2325
namespace mlx
@@ -30,7 +32,7 @@ namespace mlx
3032
void* param = nullptr;
3133
};
3234

33-
class Input
35+
class MLX_API Input
3436
{
3537
public:
3638
Input();

src/renderer/core/render_core.h

Lines changed: 3 additions & 2 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/08 19:16:32 by maldavid #+# #+# */
9-
/* Updated: 2023/11/20 07:20:43 by maldavid ### ########.fr */
9+
/* Updated: 2023/12/08 18:53:36 by kbz_8 ### ########.fr */
1010
/* */
1111
/* ************************************************************************** */
1212

@@ -24,6 +24,7 @@
2424

2525
#include <utils/singleton.h>
2626
#include <core/errors.h>
27+
#include <core/profile.h>
2728

2829
namespace mlx
2930
{
@@ -42,7 +43,7 @@ namespace mlx
4243

4344
constexpr const int MAX_FRAMES_IN_FLIGHT = 3;
4445

45-
class Render_Core : public Singleton<Render_Core>
46+
class MLX_API Render_Core : public Singleton<Render_Core>
4647
{
4748
public:
4849
Render_Core() = default;

0 commit comments

Comments
 (0)