+ std::string real_path = "";
+#ifdef _WIN32
+ DWORD retval=0;
+ BOOL success;
+ TCHAR buffer[4096]=TEXT("");
+ TCHAR buf[4096]=TEXT("");
+ TCHAR** lppPart={NULL};
+ // Retrieve the full path name for a file.
+ // The file does not need to exist.
+ retval = GetFullPathName(path.c_str( ),
+ 4096,
+ buffer,
+ lppPart);
+ real_path = buffer;
+#else // _WIN32
+ real_path = std::string( realpath( path.c_str( ), NULL ) );
+#endif // _WIN32