【发布时间】:2018-10-28 00:10:18
【问题描述】:
为文本块创建实心画笔 (cppwinrt) 时,我在构建时遇到错误,使用:
void MainPage::myStyle(Controls::TextBlock & block)
{
block.FontSize(72.0);
block.Foreground(Media::SolidColorBrush(Windows::UI::Colors::Orange()));
block.VerticalAlignment(VerticalAlignment::Center);
}
错误:LNK2019 无法解析的外部符号“public: __thiscall winrt::Windows::UI::Xaml::Media::SolidColorBrush::SolidColorBrush(struct winrt::Windows::UI::Color const &)”
当我取出solidbrush时出现错误,我也尝试了其他版本的solidbrush,但出现相同错误。
【问题讨论】: