【问题标题】:Wrapper class for Tesseract API using c++使用 C++ 的 Tesseract API 的包装器类
【发布时间】:2012-07-19 16:23:18
【问题描述】:

我正在尝试使用 c++ 为 TesseractAPI 创建一个包装类。我从这里找到了一个例子 https://groups.google.com/forum/?fromgroups#!topic/tesseract-ocr/7NIr71BQH8c

当我尝试使用以下命令编译程序时

    g++ -o test TessApi.cpp -l /usr/local/include/tesseract/ -l /usr/include/leptonica/ -L /usr/local/lib/ -l tesseract

不走运,我收到以下错误

    TessApi.cpp:1:21: fatal error: baseapi.h: No such file or directory
    compilation terminated.

谁能帮我解决这个问题。 提前致谢。

【问题讨论】:

    标签: c++ ocr tesseract


    【解决方案1】:

    您似乎没有正确指定命令。 -l 指定要链接的库,而-I 用于指定包含目录。试试:

    g++ -o test TessApi.cpp -I/usr/local/include/tesseract/ -I/usr/include/leptonica/ -L/usr/local/lib/ -ltesseract
    

    假设 Tesseract 实际安装在/usr/local/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2010-12-28
      • 2011-09-26
      • 1970-01-01
      • 2018-06-26
      • 1970-01-01
      • 2018-04-10
      • 1970-01-01
      相关资源
      最近更新 更多