From df608c43b00c246d76a18051e76526ba409d9ba4 Mon Sep 17 00:00:00 2001 From: fasiondog Date: Wed, 1 Dec 2021 00:24:58 +0800 Subject: [PATCH] fixed demo, unit-test target complie on ubuntu20.04 --- hikyuu_cpp/demo/demo.cpp | 2 ++ hikyuu_cpp/unit_test/xmake.lua | 1 + 2 files changed, 3 insertions(+) diff --git a/hikyuu_cpp/demo/demo.cpp b/hikyuu_cpp/demo/demo.cpp index f3dc67d80..8e53527ad 100644 --- a/hikyuu_cpp/demo/demo.cpp +++ b/hikyuu_cpp/demo/demo.cpp @@ -40,6 +40,8 @@ int main(int argc, char* argv[]) { std::this_thread::sleep_for(std::chrono::seconds(1)); } +#if defined(_WIN32) SetConsoleOutputCP(old_cp); +#endif return 0; } diff --git a/hikyuu_cpp/unit_test/xmake.lua b/hikyuu_cpp/unit_test/xmake.lua index 43d7b1688..511bebd46 100644 --- a/hikyuu_cpp/unit_test/xmake.lua +++ b/hikyuu_cpp/unit_test/xmake.lua @@ -31,6 +31,7 @@ target("unit-test") add_links("boost_unit_test_framework") add_links("boost_filesystem") add_links("boost_serialization") + add_links("sqlite3") add_shflags("-Wl,-rpath=$ORIGIN", "-Wl,-rpath=$ORIGIN/../lib") end