diff --git a/CMakeLists.txt b/CMakeLists.txt index 046bbd3..363aa33 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,10 +38,12 @@ if (${OS_TYPE} STREQUAL "WINDOWS") #需要加该参数,不然VS会报错 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /utf-8") else() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Werror -Wall -Wextra") set(POCO_LINK_DIR ${CMAKE_SOURCE_DIR}/third_party/lib/linux/poco/) if (${OS_TYPE} STREQUAL "APPLE") set(POCO_LINK_DIR ${CMAKE_SOURCE_DIR}/third_party/lib/macOS/poco/) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra") + else() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Werror -Wall -Wextra") endif() set(POCO_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/third_party/include/) set(POCO_LIBS PocoNetSSL PocoNet PocoCrypto PocoUtil PocoJSON PocoFoundation PocoXML) diff --git a/include/request/object_req.h b/include/request/object_req.h index 69edea8..c3d79b4 100644 --- a/include/request/object_req.h +++ b/include/request/object_req.h @@ -176,7 +176,9 @@ class GetObjectByFileReq : public GetObjectReq { #endif private: +#if defined(_WIN32) bool mb_is_widechar_path; +#endif std::string m_local_file_path; };