CMake无法找到glog

时间:2017-04-07 17:56:26

标签: cmake

protected void upimg_about_Click(object sender, EventArgs e)
{               
    // make sure at least 1 file
    if (!Image1.HasFile && !Image2.HasFile)
    {
        data1.Text="No Images Uploaded";
        return;
    }

    con.Open();
    UploadImage(Image1, "[image]");
    UploadImage(Image2, "[image2]");
    con.Close();

    data1.Text = "Image Updated Successfully";    
}

void UploadImage(FileUpload fileUpload, string columnName)
{
    if (!fileUpload.HasFile)
    {
        return;
    }

    string sqlQuery = "UPDATE [dbo].[tbldetails] SET " + columnName + "=@image WHERE id=@id";
    SqlCommand cmd = new SqlCommand(sqlQuery, con);
    cmd.Parameters.AddWithValue("@id", Session["email"].ToString());

    int img = fileUpload.PostedFile.ContentLength;
    byte[] msdata = new byte[img];
    fileUpload.PostedFile.InputStream.Read(msdata, 0, img);
    cmd.Parameters.AddWithValue("@image", msdata);

    cmd.ExecuteNonQuery();
}

这是cmake文件。我在CMAKE_MINIMUM_REQUIRED(VERSION 2.8.7 FATAL_ERROR) INCLUDE(FindPackageHandleStandardArgs) FIND_LIBRARY(GLOG_LIBRARY glog) FIND_PATH(GLOG_INCLUDE_DIR "glog/logging.h") SET(GLOG_LIBRARIES ${GLOG_LIBRARY}) FIND_PACKAGE_HANDLE_STANDARD_ARGS( Glog REQUIRED_ARGS GLOG_INCLUDE_DIR GLOG_LIBRARY) 中安装了google glog 0.3.4。为什么在编译此文件时,仍然存在以下错误?我查了一下,/apps/glog位于glog/logging.h

0.3.4/include/glog/

1 个答案:

答案 0 :(得分:0)

官方glog尚未支持glog。

在github中,@ sergiud支持cmake。 请参阅 https://github.com/google/glog/issues/4