-
Notifications
You must be signed in to change notification settings - Fork 677
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IUnknown is an ambiguous symbol #5218
Comments
You'd need to disambiguate based on what kind of |
@RealTommyKlein I changed the method to something like this: IAsyncAction MainWindow::MenuOpenFolder(const IInspectable& sender, const RoutedEventArgs& e)
{
FolderPicker folderPicker;
{
using IUnknown = ::IUnknown;
folderPicker.as<IInitializeWithWindow>()->Initialize(GetActiveWindow());
}
folderPicker.FileTypeFilter().Append(L"*");
StorageFolder result = co_await folderPicker.PickSingleFolderAsync();
if (result)
{
Configuration config = Configuration::LoadConfiguration();
std::string folderPath = to_string(result.Path());
m_musicFolder.FolderPath(folderPath);
config.PreviousMusicFolderPath(folderPath);
LblStatus().Text(result.Path());
Configuration::SaveConfiguration(config);
MenuRefreshFolder(nullptr, nullptr);
}
} And i'm still getting the issue. I also moved it to the top of the window same thing |
It'd need to be in your precompiled header instead of the place you're using it, since I'm guessing the error is happening when including the
That allows the WinRT |
Removing |
Hi all,
I'm trying to get my C++ WinUI 3 Win32 app to work with a FolderPicker. I included
#include <shobjidl.h>
to set up my FolderPicker:However, I'm getting a
IUnknown is an ambiguous symbol
error as a result of including that file.This is my pch.h file for reference as well:
How can I fix the ambiguity?
The text was updated successfully, but these errors were encountered: