首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Windows + Visual Studio上的Leptonica

Windows + Visual Studio上的Leptonica
EN

Stack Overflow用户
提问于 2020-04-01 18:33:00
回答 2查看 361关注 0票数 1

使用Visual Studio在Windows上安装Leptonica时,我遵循了以下步骤

代码语言:javascript
复制
3. Building on Windows

   (a) Building with Visual Studio

       1. Download the latest SW
              (Software Network https://software-network.org/)
          client from https://software-network.org/client/
       2. Unpack it, add to PATH.
       3. Run once to perform cmake integration:
          sw setup
       4. Run:
          git clone [https://github.com/danbloomberg/leptonica](https://github.com/danbloomberg/leptonica)
          cd leptonica
          mkdir build
          cd build
          cmake ..
       5. Build a solution (leptonica.sin) in your Visual Studio version.

除了第5步,我做了所有的工作。

我的build目录现在如下所示:

代码语言:javascript
复制
ALL_BUILD.vcxproj          LeptonicaConfig.cmake
ALL_BUILD.vcxproj.filters  LeptonicaConfig-version.cmake
cmake_install.cmake        LeptonicaTargets.cmake
cmake_uninstall.cmake      src/
CMakeCache.txt             sw_build_dependencies.vcxproj
CMakeFiles/                sw_build_dependencies.vcxproj.filters
config_auto.h.in           uninstall.vcxproj
INSTALL.vcxproj            uninstall.vcxproj.filters
INSTALL.vcxproj.filters    x64/
lept.pc                    ZERO_CHECK.vcxproj
leptonica.sln              ZERO_CHECK.vcxproj.filters

我似乎找不到leptonica.sin,如何与visual studio集成?我需要剩下的步骤。我是visual studio的新手,请注意我的问题。

我有Visual Studio 2019

EN

回答 2

Stack Overflow用户

发布于 2021-03-11 10:46:22

你可能已经弄明白了(我希望),但如果没有…你列出的第五步有一个拼写错误:

  1. 在您的Visual Studio版本中生成解决方案(leptonica.sin)。

它应该是leptonica.sLn,就像在Visual Studio解决方案文件中一样。

在您的构建目录清单中,您有leptonic.sln。如果您双击它,它应该在Visual Studio中打开(假设是默认/正确的安装)。

票数 0
EN

Stack Overflow用户

发布于 2022-02-11 18:02:01

使用Visual Studio2019,至少你实际上不必像这样手动生成一个使用CMake的解决方案文件,因为Visual Studio现在支持打开包含CMakeLists.txt文件的文件夹,就像它们是解决方案一样。

您只需执行以下操作即可在Windows上构建Leptonica:

将sw--

  1. -client.zip从https://software-network.org/client/.
  2. Unzip sw.exe下载到某个目录sw_dir。
  3. 将sw_dir添加到您的path环境变量。注销并登录以确保路径已更新。Git
  4. 进入power shell等,并从命令行运行"sw setup“。
  5. Git从初始化对话框VS中的https://github.com/danbloomberg/leptonica
  6. Start up Visual Studio.
  7. Choose”打开本地文件夹“中克隆
  8. 到某个目录。选择Leptonica文件夹。

此时,Visual Studio将开始在该文件夹上运行CMake,并且假设它可以找到sw.exe,它应该会成功。这一步需要一段时间。完成后,您可以从build toplevel菜单中执行build all

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/60968901

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档