doc/sample-project/hello_world.cc
raw| 1 | #include <cstdlib> |
| 2 | #include <iostream> |
| 3 | |
| 4 | #include <colmap/controllers/option_manager.h> |
| 5 | #include <colmap/util/string.h> |
| 6 | |
| 7 | int main(int argc, char** argv) { |
| 8 | colmap::InitializeGlog(argv); |
| 9 | |
| 10 | std::string message; |
| 11 | colmap::OptionManager options; |
| 12 | options.AddRequiredOption("message", &message); |
| 13 | if (!options.Parse(argc, argv)) { |
| 14 | return EXIT_FAILURE; |
| 15 | } |
| 16 | |
| 17 | std::cout << colmap::StringPrintf("Hello %s!\n", message.c_str()); |
| 18 | |
| 19 | return EXIT_SUCCESS; |
| 20 | } |