【问题标题】:An invalid parameter error at msvcr120.dll (Building Tesseract Lib in 64bit Windows)msvcr120.dll 出现无效参数错误(在 64 位 Windows 中构建 Tesseract Lib)
【发布时间】:2015-05-11 04:36:07
【问题描述】:

我已经向 Tesseract 论坛提出了询问,但是我是否能找到错误的线索,我再次在这个论坛提出问题。因为这是我最喜欢解决问题的论坛。

我有一个与 tesseract 库有关的问题。

问题在于 libtiff 是 leptonica 库中使用的组件之一。

我完全按照here的描述进行了操作

为我的 64 位窗口构建 libtiff。

C:\LIBTIFF\LIBTIFF> nmake /f makefile.vc
C:\LIBTIFF\LIBTIFF> cd ..\tools
C:\LIBTIFF\TOOLS> nmake /f makefile.vc

构建没问题。 使用 tiff 库,我为 64 位 Windows 构建了 leptonica 库和 tessearact 库。 一旦我使用 tesseract lib 运行我的应用程序,我在 tiff lib 出现错误,错误是

“TessarActOCR_test.exe 中 0x00007FFA966FDD27 (msvcr120.dll) 处的未处理异常:将无效参数传递给认为无效参数致命的函数。”

错误发生在以下函数的 lseek 处。函数位于tiffio.c

static TIFF *
fopenTiff(FILE        *fp,tif_win32.c
          const char  *modestring)
{
l_int32  fd;

    PROCNAME("fopenTiff");

    if (!fp)
        return (TIFF *)ERROR_PTR("stream not opened", procName, NULL);
    if (!modestring)
        return (TIFF *)ERROR_PTR("modestring not defined", procName, NULL);

    if ((fd = fileno(fp)) < 0)
        return (TIFF *)ERROR_PTR("invalid file descriptor", procName, NULL);
    lseek(fd, 0, SEEK_SET);

    return TIFFFdOpen(fd, "TIFFstream", modestring);
}

这个错误可能有什么问题?

【问题讨论】:

    标签: c++ tesseract tiff libtiff leptonica


    【解决方案1】:

    现在我解决了所有问题,并且 tesseract lib 在我的 64 位电脑和项目上运行。我的解决方案是在准备依赖项期间按照link 中的讨论逐步进行。然后构建 leptonica 库,然后链接到 tesseract 以构建 tesseract 库。现在一切正常。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-06-04
      • 2019-10-09
      • 1970-01-01
      相关资源
      最近更新 更多