Open denchat opened 5 years ago
I'm not sure. I do see that SHGetKnownFolderPath
is used in tz.cpp, and I note this comment:
// None of this happens with the MS SDK (at least VS14 which I tested), but: // Compiling with mingw, we get "error: 'KF_FLAG_DEFAULT' was not declared in this scope." // and error: 'SHGetKnownFolderPath' was not declared in this scope.". // It seems when using mingw NTDDI_VERSION is undefined and that // causes KNOWN_FOLDERFLAG and the KF flags to not get defined. // So we must define NTDDI_VERSION to get those flags on mingw. // The docs say though here: // https://msdn.microsoft.com/en-nz/library/windows/desktop/aa383745(v=vs.85).aspx // that "If you define NTDDI_VERSION, you must also define _WIN32_WINNT." // So we declare we require Vista or greater.
I don't have Windows to test on.
SHGetKnownFolderPath on this page https://docs.microsoft.com/en-us/windows/desktop/api/shlobj_core/nf-shlobj_core-shgetknownfolderpath
SDK API requires: Vista defined in header: shlobj_core.h DLL: Shell32.dll (version 6.0.6000++)
I tried compile my code agaist tz.lib using clang target msvc.
Perhaps other than
-lole32
(in documentation), now tz.lib also requires-lshell32
on windows? Is it just because that mingw64 automatically links agaist shell32.lib by default?