I want to programmatically create a Windows shortcut (.lnk
file) to a folder. To do this, I tried this code snippet. However, I get the compilation error C2371 'WebBrowser': redefinition; different basic types
in C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\um\exdisp.h line 2367
.
Is there a C++17 std::filesystem
API for this? If not, how can I fix the compilation error from above? Even with cleaned up includes, the error persists:
#include <Windows.h>
#include <shlguid.h>
#include <shobjidl_core.h>
Using the mklink
command yields:
The device does not support symbolic links.
So that doesn't work either, maybe because this is an external SSD.
What else could I try?