Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cxxopts::OptionParseException deprecated in newest version of cxxopts #12

Closed
lovelacelee opened this issue Sep 27, 2023 · 3 comments
Closed

Comments

@lovelacelee
Copy link

cxxopts::OptionParseException deprecated in newest version of cxxopts
cuase the compiling error as follow:

config-cpp.cpp: In member function ‘bool ConfigCpp::ConfigCpp::ReadInConfig()’:
config-cpp.cpp:176:27: error: ‘OptionParseException’ in namespace ‘cxxopts’ does not name a type
  176 |         } catch (cxxopts::OptionParseException &e) {
      |                           ^~~~~~~~~~~~~~~~~~~~
config-cpp.cpp:178:39: error: ‘e’ was not declared in this scope
  178 |             std::cout << "Error: " << e.what() << "\n";
      |                                       ^
At global scope:
cc1plus: warning: unrecognized command line option ‘-Wno-predefined-identifier-outside-function’
@CJLove
Copy link
Owner

CJLove commented Sep 28, 2023

Thanks for the heads up! Will take a look when I have the chance; probably this weekend.

@CJLove
Copy link
Owner

CJLove commented Sep 29, 2023

Looks like this changed as of cxxopt v3.1.0. Next update will specify version 3.1.0 or later.

@CJLove
Copy link
Owner

CJLove commented Sep 30, 2023

Resolved by 6788afa. Requiring cxxopt v3.1.1 or later because v3.1.0 had an incorrect version number in its header.

@CJLove CJLove closed this as completed Sep 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants