diff --git a/Makefile b/Makefile index 6b24425..3c83b7b 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ EX=reflex2q3 CC=g++ -CFLAGS=-std=c++11 -static -static-libgcc -static-libstdc++ -I"/mingw64/include/eigen3" -I"include" -I"lib/Catch/single_include" -I"lib/cxxopts/include" -I"/usr/include/eigen3" +CFLAGS=-static -static-libgcc -static-libstdc++ -I"/mingw64/include/eigen3" -I"include" -I"lib/Catch/single_include" -I"lib/cxxopts/include" -I"/usr/include/eigen3" TESTEX=runtests all: main test diff --git a/README.md b/README.md index a9430d7..69a43d4 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ We've provided Quake 3 and Xonotic entity conversion files (r2q3.rem and r2xonot #### Compiler(s) * mingw-w64, GCC 5.3.0 -* gcc version 7.1.1 20170528 +* gcc (Debian 10.2.1-6) 10.2.1 20210110 #### Tested With * netradiant-1.5.0-20120301 diff --git a/lib/cxxopts b/lib/cxxopts index d7b9308..eb78730 160000 --- a/lib/cxxopts +++ b/lib/cxxopts @@ -1 +1 @@ -Subproject commit d7b930846cdccfc8bcecc4d7150ddcbadffac360 +Subproject commit eb787304d67ec22f7c3a184ee8b4c481d04357fd diff --git a/src/main.cpp b/src/main.cpp index 529e0b8..acc50cb 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -45,12 +46,12 @@ cxxopts::Options arguments(int ac, char ** av) { cxxopts::value(), "FILE") ; o.parse_positional(parg); - o.parse(ac, av); - if (o.count("help")) { + auto options = o.parse(ac, av); + if (options.count("help")) { cout << o.help() << endl; } - if (o.count(ARG_INPUT_SHORTALIAS) < 1 || - o.count(ARG_OUTPUT_SHORTALIAS) < 1) { + if (options.count(ARG_INPUT_SHORTALIAS) < 1 || + options.count(ARG_OUTPUT_SHORTALIAS) < 1) { cerr << "error: no input or output file given" << endl; exit(EXIT_FAILURE); } @@ -73,7 +74,7 @@ stringstream loadmap(const char *filename) { return output; } -bool convert_worldspawn(const cxxopts::Options &o, +bool convert_worldspawn(const cxxopts::ParseResult &o, vector > &q) { bool is_ok = false; brushdef fn = &brushdef_net; @@ -118,7 +119,7 @@ void print_entities(vector > &q) { } -void convert_entities(const cxxopts::Options &o, const vector > &q) { +void convert_entities(const cxxopts::ParseResult &o, const vector > &q) { string entfile = o["e"].as(); if (entfile.empty()) { cout << "No entity data file given" @@ -146,12 +147,13 @@ int main(int argc, char** argv) { try { cxxopts::Options p = arguments(argc, argv); + auto options = p.parse(argc, argv); vector > entities; - bool is_ok = convert_worldspawn(p, entities); + bool is_ok = convert_worldspawn(options, entities); // print_entities(entities); - convert_entities(p, entities); + convert_entities(options, entities); } - catch (cxxopts::option_not_exists_exception e) { + catch (cxxopts::exceptions::no_such_option e) { cerr << e.what() << endl << "./reflex2q3 -h for usage information" << endl; return -1;