From: Rafał Długołęcki Date: Wed, 20 May 2015 19:09:33 +0000 (+0200) Subject: Copy README. X-Git-Tag: v0.2.1~1 X-Git-Url: https://git.dlugolecki.net.pl/?a=commitdiff_plain;h=1eb7a0107df8aef30039c490e79c4ab359acdf40;p=command.git Copy 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.