#pragma once // ============================================================================ // ENGINE_API — DLL export/import control macro // // HOW TO USE // ---------- // Library project (CodeAid): // Add ENGINE_EXPORTS to Project Properties → // C/C++ → Preprocessor → Preprocessor Definitions. // This causes all ENGINE_API-decorated symbols to be __declspec(dllexport). // // Consuming projects: // Do NOT define ENGINE_EXPORTS. ENGINE_API becomes __declspec(dllimport), // which tells the linker to resolve decorated symbols from the DLL's .lib // import library. No engine.cpp needs to be added to the consuming project. // // WHAT IS DECORATED // ----------------- // Logger — class ENGINE_API Logger // GpuDeviceInfo — struct ENGINE_API GpuDeviceInfo // Int8EntropyCalibrator2 — class ENGINE_API Int8EntropyCalibrator2 // Engine — explicit instantiation at bottom of engine.h // (and any other Engine types listed there) // ============================================================================ #ifdef ENGINE_EXPORTS # define ENGINE_API __declspec(dllexport) #else # define ENGINE_API __declspec(dllimport) #endif