uatuko / bitz-server

An ICAP server implementation in C++
27 stars 4 forks source link

Compiling against current versions of spdlog #16

Open gr3m1in opened 5 years ago

gr3m1in commented 5 years ago

Hi, I've faced the following errors while compiling bitz-server against spdlog versions 1.2.1-1.3.1.

main.cpp:39:24: error: ‘stdout_color_st’ is not a member of ‘spdlog’
  auto logger = spdlog::stdout_color_st( "bitz-server" );
main.cpp:78:20: error: ‘rotating_logger_mt’ is not a member of ‘spdlog’
   logger = spdlog::rotating_logger_mt( "bitz-server", config.log_file, ( 1048576 * 1024 ), 7 );

It appears that spdlog/sinks includes are missing, so the following patch helped

--- a/src/main.cpp      2019-04-18 15:41:29.164777730 +0200
+++ b/src/main.cpp      2019-04-18 15:46:02.589397199 +0200
@@ -21,6 +21,8 @@

 #include <config.h>
 #include <spdlog/spdlog.h>
+#include "spdlog/sinks/stdout_color_sinks.h"
+#include "spdlog/sinks/rotating_file_sink.h"

 #include "bitz-server.h"
 #include "bitz/config.h"

Latest spdlog version against which it now compiles is 1.3.1 Compiled using gcc 8.2.0-r6 If you need any additional information, feel free to ask :)

Kind regards, gr3m1in