Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit69d2c11

Browse files
jinyuqiJin Yuqi (Ricky)
and
Jin Yuqi (Ricky)
authored
Fix build failed for cxxopt submodule updating (#886)
Co-authored-by: Jin Yuqi (Ricky) <jinyq@new-rt.com>
1 parent59fabb8 commit69d2c11

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

‎libs/network/example/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
include_directories(${CPP-NETLIB_SOURCE_DIR})
77
include_directories(${CPP-NETLIB_SOURCE_DIR}/deps/cxxopts/src)
8+
include_directories(${CPP-NETLIB_SOURCE_DIR}/deps/cxxopts/include)
89
if (OPENSSL_FOUND)
910
include_directories(${OPENSSL_INCLUDE_DIR})
1011
endif (OPENSSL_FOUND)

‎libs/network/example/http_client.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,22 @@ int main(int argc, char* argv[]) {
2929
;
3030

3131
options.parse_positional(std::vector<std::string>{"source"});
32-
options.parse(argc, argv);
32+
auto optionsResults =options.parse(argc, argv);
3333

34-
if (options.count("help")) {
34+
if (optionsResults.count("help")) {
3535
std::cout << options.help({"","Group"}) << std::endl;
3636
return EXIT_SUCCESS;
3737
}
3838

39-
if (options.count("source") <1) {
39+
if (optionsResults.count("source") <1) {
4040
std::cout <<"Error: Source URL required." << std::endl;
4141
std::cout << options.help({"","Group"}) << std::endl;
4242
return EXIT_FAILURE;
4343
}
4444

45-
std::string source =options["source"].as<std::string>();
46-
bool show_headers =options.count("headers") ?true :false;
47-
bool show_status =options.count("status") ?true :false;
45+
std::string source =optionsResults["source"].as<std::string>();
46+
bool show_headers =optionsResults.count("headers") ?true :false;
47+
bool show_status =optionsResults.count("status") ?true :false;
4848

4949
http::client::requestrequest(source);
5050
http::client::string_type destination_ =host(request);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp