diff --git a/src/sinks/ansicolor_sink.cpp b/src/sinks/ansicolor_sink.cpp index 7237571a..5de60b48 100644 --- a/src/sinks/ansicolor_sink.cpp +++ b/src/sinks/ansicolor_sink.cpp @@ -113,9 +113,9 @@ ansicolor_stderr_sink::ansicolor_stderr_sink(color_mode mode) // template instantiations template class SPDLOG_API ansicolor_stdout_sink; -template class SPDLOG_API ansicolor_stdout_sink; +template class SPDLOG_API ansicolor_stdout_sink; template class SPDLOG_API ansicolor_stderr_sink; -template class SPDLOG_API ansicolor_stderr_sink; +template class SPDLOG_API ansicolor_stderr_sink; } // namespace sinks } // namespace spdlog diff --git a/src/sinks/wincolor_sink.cpp b/src/sinks/wincolor_sink.cpp index 02f43f73..a03957ac 100644 --- a/src/sinks/wincolor_sink.cpp +++ b/src/sinks/wincolor_sink.cpp @@ -122,14 +122,14 @@ void wincolor_sink::write_to_file_(const memory_buf_t &formatted) { } // template instantiations -template class SPDLOG_API wincolor_sink; -template class SPDLOG_API wincolor_sink; +template +wincolor_stdout_sink::wincolor_stdout_sink(color_mode mode) + : wincolor_sink(::GetStdHandle(STD_OUTPUT_HANDLE), mode) {} -template class SPDLOG_API wincolor_stdout_sink; -template class SPDLOG_API wincolor_stdout_sink; - -template class SPDLOG_API wincolor_stderr_sink; -template class SPDLOG_API wincolor_stderr_sink; +// wincolor_stderr_sink +template +wincolor_stderr_sink::wincolor_stderr_sink(color_mode mode) + : wincolor_sink(::GetStdHandle(STD_ERROR_HANDLE), mode) {} } // namespace sinks } // namespace spdlog