Engine.h:
Код: Выделить всё
#pragma once
#ifdef ENGINE_EXPORTS
#define ENGINE_API __declspec(dllexport)
#else
#define ENGINE_API __declspec(dllimport)
#endif
// Logging functions
template
ENGINE_API void EngineLog(const T& first, const Args&... args); // this started causing problems.
// Other unrelated functions
В файле Engine.cpp; это функция, которая ведет журнал:
Код: Выделить всё
//top of Engine:
#include "Engine.h"
template
void EngineLog(const T& first, const Args&... args) {
std::ostringstream oss;
oss
Подробнее здесь: [url]https://stackoverflow.com/questions/78400186/my-c-logger-implementation-doesnt-seem-to-work[/url]
Мобильная версия