From 1eb7a0107df8aef30039c490e79c4ab359acdf40 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C5=82=20D=C5=82ugo=C5=82=C4=99cki?= Date: Wed, 20 May 2015 21:09:33 +0200 Subject: [PATCH] Copy README. --- README | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 README diff --git a/README b/README new file mode 100644 index 0000000..302782f --- /dev/null +++ b/README @@ -0,0 +1,54 @@ +# Command + +C++ library for handling command line arguments, designed to be easily used. + +## Installation + + $ ./autogen.sh + $ ./configure + $ make + $ sudo make install + +## Configuration + +You need to enable c++11 support in your compiler. You can achieve that in +g++ and clang++ by adding `-std=c++11` compilation flag. + +As this is header-only library, you don't need any additional steps. + +## Usage + +example.cpp: + + #include + #include + #include + + using namespace command; + + int main(int argc, char *argv[]) { + try { + Command command(argc, argv, { + new Option("-h", "Help", [](void) { std::cout << "Help information\n"; }) + }); + } + catch(const std::exception & e) { + return 1; + } + + return 0; + } + +Now program can be compiled & run using following commands: + + $ g++ -std=c++11 example.cpp + $ ./a.out -h + Help information + +## Documentation + +Current documentation can be found at: +http://dlugolecki.net.pl/software/command/docs/ + +If for some reason it is unavailable, you can build it yourself. The only +requirement is to have [Doxygen](http://www.doxygen.org/) installed when `make` command is invoked. -- 2.30.2