修改导出宏

This commit is contained in:
Nanako 2024-03-08 17:46:52 +08:00
parent e5f2eab9cc
commit c7f0281ea5

View File

@ -1,12 +1,11 @@
#pragma once
#include "spdlog/spdlog.h"
#define CORE_API
// #ifdef core_EXPORTS
// #define CORE_API __declspec(dllexport)
// #else
// #define CORE_API __declspec(dllimport)
// #endif
#ifdef core_EXPORTS
#define CORE_API __declspec(dllexport)
#else
#define CORE_API __declspec(dllimport)
#endif
#if defined(_DEBUG) || defined(DEBUG)
#define checkf(expr, msg, ...) if (!(expr)) { spdlog::error(msg, __VA_ARGS__); throw std::runtime_error(fmt::format(msg, __VA_ARGS__)); }