diff --git a/samples/geotag.cpp b/samples/geotag.cpp index e50023f5..b28ab02b 100644 --- a/samples/geotag.cpp +++ b/samples/geotag.cpp @@ -8,9 +8,16 @@ #include #include -#include #include +#if __has_include() +#include +namespace fs = std::filesystem; +#else +#include +namespace fs = std::experimental::filesystem; +#endif + using namespace std; #ifdef _WIN32 @@ -795,7 +802,7 @@ int main(int argc, const char* argv[]) { printf("%s %s ", arg, types[type]); if (type == typeImage) { time_t t = readImageTime(std::string(arg)); - auto p = std::filesystem::absolute(std::filesystem::path(arg)); + auto p = fs::absolute(fs::path(arg)); std::string path = p.string(); if (t && !path.empty()) { if (options.verbose)