用MinGW构建libwebsockets库

时间:2018-10-18 13:42:10

标签: c libwebsockets

我正在尝试按照https://github.com/warmcat/libwebsockets/blob/master/READMEs/README.build.md上提供的步骤,使用minGW构建libwebsockets库 在该部分下 @section cmwmgw在Windows(MinGW)上构建

我在做

NameID

目录“ C:\ Users \ pro12 \ Desktop \ lib \ libwebsockets”包含libwebsockets库的源文件,我正在从\ n运行该命令

class MultiConverter : IMultiValueConverter
{
    public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
    {
        return (int)values[0] == -1 && values[1] != null;
    }

    public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
    {
        throw new NotSupportedException();
    }
}

但是它给了我错误

<ComboBox ... 
          SelectedValue="{Binding NameID}">
    <ComboBox.Resources>
        <local:MultiConverter x:Key="MultiConverter" />
    </ComboBox.Resources>
    <ComboBox.Style>
        <Style TargetType="ComboBox" BasedOn="{StaticResource ComboBoxFlat}">
            <Style.Triggers>
                <DataTrigger Value="True">
                    <DataTrigger.Binding>
                        <MultiBinding Converter="{StaticResource MultiConverter}">
                            <Binding Path="SelectedIndex" RelativeSource="{RelativeSource Self}" />
                            <Binding Path="NameID" />
                        </MultiBinding>
                    </DataTrigger.Binding>
                    <Setter Property="BorderBrush" Value="Red" />
                    <Setter Property="BorderThickness" Value="10" />
                </DataTrigger>
            </Style.Triggers>
        </Style>
    </ComboBox.Style>
</ComboBox>

有人可以告诉我我在做什么错吗?谢谢

1 个答案:

答案 0 :(得分:0)

由于您是在C:\Users\pro12\Desktop\libwebsockets\build中构建它,而您的源代码是在C:\Users\pro12\Desktop\libwebsockets中,因此显然cmake找不到CMakeLists.txt,请尝试

cmake -G“ MSYS Makefiles” -DCMAKE_INSTALL_PREFIX = C:\ Users \ pro12 \ Desktop \ lib \ libwebsockets ..

不要省略..两个尾点:这些点指示父目录!