From 59cb4e2d9c368d97b88927a04594f4aa84ba5db7 Mon Sep 17 00:00:00 2001 From: Sergey Yakubov <sergey.yakubov@desy.de> Date: Mon, 27 Jan 2020 15:21:18 +0100 Subject: [PATCH] make it compile --- 3d_party/libcurl/install_VS2019.cmd | 21 +++++++++++++++++++ common/cpp/include/common/error.h | 2 +- common/cpp/include/database/database.h | 2 +- common/cpp/include/logger/logger.h | 2 +- common/cpp/src/http_client/curl_http_client.h | 1 + common/cpp/src/logger/spd_logger.h | 1 + common/cpp/src/system_io/system_io.h | 2 ++ .../cpp/src/system_io/system_io_windows.cpp | 1 + .../json_parser/test_json_parser.cpp | 1 + consumer/api/cpp/include/asapo_consumer.h | 2 +- .../api/cpp/unittests/test_server_broker.cpp | 2 ++ .../api/cpp/unittests/test_tcp_client.cpp | 1 + .../unittests/test_tcp_connection_pool.cpp | 1 + .../unittests/test_folder_to_db.cpp | 1 + .../test_receiver_data_server.cpp | 1 + .../receiver_data_server/test_tcp_server.cpp | 2 +- 16 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 3d_party/libcurl/install_VS2019.cmd diff --git a/3d_party/libcurl/install_VS2019.cmd b/3d_party/libcurl/install_VS2019.cmd new file mode 100644 index 000000000..919029a4c --- /dev/null +++ b/3d_party/libcurl/install_VS2019.cmd @@ -0,0 +1,21 @@ +:: download and untar libcurl sources to dir +:: https://curl.haxx.se/download/curl-7.58.0.tar.gz + +:: set directory with libcurl sources +SET dir=c:\tmp\curl-7.58.0 +:: set directory where libcurl should be installed +SET install_dir=c:\Curl + +set mypath=%cd% + +call "c:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat" + +cd /d %dir%\winbuild + +#nmake.exe /f Makefile.vc mode=static VC=16 MACHINE=X64 RTLIBCFG=static + +xcopy /isvy %dir%\builds\libcurl-vc16-X64-release-static-ipv6-sspi-winssl\include %install_dir%\include +xcopy /isvy %dir%\builds\libcurl-vc16-X64-release-static-ipv6-sspi-winssl\lib %install_dir%\lib +rename %install_dir%\lib\libcurl_a.lib libcurl.lib + + diff --git a/common/cpp/include/common/error.h b/common/cpp/include/common/error.h index 938baf6fa..e2a49f858 100644 --- a/common/cpp/include/common/error.h +++ b/common/cpp/include/common/error.h @@ -4,7 +4,7 @@ #include <string> #include <memory> #include <utility> - +#include <ostream> namespace asapo { enum class ErrorType { diff --git a/common/cpp/include/database/database.h b/common/cpp/include/database/database.h index 04979a761..550e06d37 100644 --- a/common/cpp/include/database/database.h +++ b/common/cpp/include/database/database.h @@ -2,7 +2,7 @@ #define ASAPO_DATABASE_H #include <string> - +#include <ostream> #include "common/data_structs.h" #include "common/error.h" diff --git a/common/cpp/include/logger/logger.h b/common/cpp/include/logger/logger.h index feaba6945..badf462c1 100644 --- a/common/cpp/include/logger/logger.h +++ b/common/cpp/include/logger/logger.h @@ -5,7 +5,7 @@ #include <string> #include "common/error.h" - +#include <ostream> namespace asapo { enum class LogLevel { diff --git a/common/cpp/src/http_client/curl_http_client.h b/common/cpp/src/http_client/curl_http_client.h index a31b1f758..a3627136e 100644 --- a/common/cpp/src/http_client/curl_http_client.h +++ b/common/cpp/src/http_client/curl_http_client.h @@ -3,6 +3,7 @@ #include <string> #include <mutex> +#include <ostream> #include "http_client/http_client.h" #include "curl/curl.h" diff --git a/common/cpp/src/logger/spd_logger.h b/common/cpp/src/logger/spd_logger.h index 904dbfc26..b2b1b041e 100644 --- a/common/cpp/src/logger/spd_logger.h +++ b/common/cpp/src/logger/spd_logger.h @@ -4,6 +4,7 @@ #include "logger/logger.h" #include "spdlog/spdlog.h" +#include <ostream> namespace asapo { class SpdLogger : public AbstractLogger { diff --git a/common/cpp/src/system_io/system_io.h b/common/cpp/src/system_io/system_io.h index 96dfa6a10..6cfd30393 100644 --- a/common/cpp/src/system_io/system_io.h +++ b/common/cpp/src/system_io/system_io.h @@ -9,6 +9,8 @@ #undef max #undef min typedef SSIZE_T ssize_t; +#include <ostream> +#include <sstream> #endif #if defined(__linux__) || defined (__APPLE__) diff --git a/common/cpp/src/system_io/system_io_windows.cpp b/common/cpp/src/system_io/system_io_windows.cpp index a4922c42e..2ff541f62 100644 --- a/common/cpp/src/system_io/system_io_windows.cpp +++ b/common/cpp/src/system_io/system_io_windows.cpp @@ -7,6 +7,7 @@ #include <fcntl.h> #include <iostream> #include <direct.h> +#include <sstream> using std::string; using std::vector; diff --git a/common/cpp/unittests/json_parser/test_json_parser.cpp b/common/cpp/unittests/json_parser/test_json_parser.cpp index 36a52780f..625b3274a 100644 --- a/common/cpp/unittests/json_parser/test_json_parser.cpp +++ b/common/cpp/unittests/json_parser/test_json_parser.cpp @@ -19,6 +19,7 @@ using ::testing::Return; using ::testing::SetArgPointee; using ::testing::HasSubstr; using ::testing::ElementsAre; +using ::testing::DoAll; using asapo::JsonFileParser; using asapo::JsonStringParser; diff --git a/consumer/api/cpp/include/asapo_consumer.h b/consumer/api/cpp/include/asapo_consumer.h index 10b8616d4..679f3aae1 100644 --- a/consumer/api/cpp/include/asapo_consumer.h +++ b/consumer/api/cpp/include/asapo_consumer.h @@ -4,5 +4,5 @@ #include "consumer/data_broker.h" #include "consumer/consumer_error.h" #include "common/version.h" - +#include <ostream> #endif //ASAPO_ASAPO_CONSUMER_H diff --git a/consumer/api/cpp/unittests/test_server_broker.cpp b/consumer/api/cpp/unittests/test_server_broker.cpp index 988cb859a..ff8c6b4db 100644 --- a/consumer/api/cpp/unittests/test_server_broker.cpp +++ b/consumer/api/cpp/unittests/test_server_broker.cpp @@ -38,6 +38,8 @@ using ::testing::Return; using ::testing::SetArgPointee; using ::testing::SetArgReferee; using testing::AllOf; +using ::testing::DoAll; + namespace { diff --git a/consumer/api/cpp/unittests/test_tcp_client.cpp b/consumer/api/cpp/unittests/test_tcp_client.cpp index 77b54e539..ae6de3ecb 100644 --- a/consumer/api/cpp/unittests/test_tcp_client.cpp +++ b/consumer/api/cpp/unittests/test_tcp_client.cpp @@ -29,6 +29,7 @@ using ::testing::Return; using ::testing::SetArgPointee; using ::testing::SetArgReferee; using testing::AllOf; +using ::testing::DoAll; namespace { diff --git a/consumer/api/cpp/unittests/test_tcp_connection_pool.cpp b/consumer/api/cpp/unittests/test_tcp_connection_pool.cpp index 8d0e139b1..2368c4485 100644 --- a/consumer/api/cpp/unittests/test_tcp_connection_pool.cpp +++ b/consumer/api/cpp/unittests/test_tcp_connection_pool.cpp @@ -29,6 +29,7 @@ using ::testing::Return; using ::testing::SetArgPointee; using ::testing::SetArgReferee; using testing::AllOf; +using ::testing::DoAll; namespace { diff --git a/consumer/tools/folder_to_db/unittests/test_folder_to_db.cpp b/consumer/tools/folder_to_db/unittests/test_folder_to_db.cpp index c8afc4614..7562b0c58 100644 --- a/consumer/tools/folder_to_db/unittests/test_folder_to_db.cpp +++ b/consumer/tools/folder_to_db/unittests/test_folder_to_db.cpp @@ -30,6 +30,7 @@ using ::testing::Mock; using ::testing::NiceMock; using ::testing::Ref; using ::testing::Return; +using ::testing::DoAll; using namespace asapo; diff --git a/receiver/unittests/receiver_data_server/test_receiver_data_server.cpp b/receiver/unittests/receiver_data_server/test_receiver_data_server.cpp index 64159e455..50017308c 100644 --- a/receiver/unittests/receiver_data_server/test_receiver_data_server.cpp +++ b/receiver/unittests/receiver_data_server/test_receiver_data_server.cpp @@ -26,6 +26,7 @@ using ::testing::_; using ::testing::SetArgPointee; using ::testing::NiceMock; using ::testing::HasSubstr; +using ::testing::DoAll; using asapo::MockLogger; diff --git a/receiver/unittests/receiver_data_server/test_tcp_server.cpp b/receiver/unittests/receiver_data_server/test_tcp_server.cpp index e09b3aea8..9b8985ef3 100644 --- a/receiver/unittests/receiver_data_server/test_tcp_server.cpp +++ b/receiver/unittests/receiver_data_server/test_tcp_server.cpp @@ -22,7 +22,7 @@ using ::testing::HasSubstr; using ::testing::Contains; using ::testing::IsEmpty; using ::testing::Mock; - +using ::testing::DoAll; using asapo::TcpServer; using asapo::MockIO; -- GitLab