【问题标题】:Running genhtml using cygwin Perl.exe in Windows在 Windows 中使用 cygwin Perl.exe 运行 genhtml
【发布时间】:2010-12-26 15:38:24
【问题描述】:

我正在尝试在 Windows 中使用来自 Cygwin 的 perl.exe 运行 genhtml。

我已经安装了cygwin,把genhtml放到了cygwin的bin目录下。我去了那个目录并在 Windows 中使用了命令行:

perl genhtml abc.dat

其中 abc.dat 是 genhtml 的 lcov 文件的名称。

但是我收到一条错误消息:

Reading data file abc.dat
genhtml: ERROR: cannot read file abc.dat!

我什至尝试使用空白文件,但返回了相同的错误。我该如何解决这个问题?

谢谢。

【问题讨论】:

    标签: windows linux cygwin code-coverage lcov


    【解决方案1】:

    abc.dat 是否在 cygwin/bin 目录中?如果不是,除非您指定完整路径,否则 genhtml 将找不到它。

    【讨论】:

    • 是的。为简单起见,我将 dat 文件放在 bin 目录中。我有一种感觉,这可能与 linux 权限设置有关,但我在 Windows 下运行,所以我怀疑是这种情况。话虽如此,我不是一个 linux 人,所以我可能会大错特错。
    【解决方案2】:

    事实证明,我确实需要去 cygwin 并在 .dat 文件的 locationm 中运行 chmod 777 才能运行它。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-05-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-10-16
      • 1970-01-01
      相关资源
      最近更新 更多