How to configure and build Tesseract OCR C++ using Visual Studio 2015 x64 on Windows 10 - c++

I am trying to run the VS2015_Tesseract example in Tesseract OCR Library.
I always get the following error when I try to open the file:
Could not find a part of the path
Currently I am working with Visual Studio 2015 on Windows 10 (64 bit).
Please provide the full information on how I can configure the Tesseract OCR C++ library on Visual Studio 2015 Windows 10 (64 bit).
You also can provide any reference tutorial links.

You have to download the vs2015_Tesseract or simply run the following git command in working directory:
git clone https://github.com/peirick/VS2015_Tesseract.git
Run the build_tesseract.bat file.
Activate tesseract as the startup project.

Related

Visual Studio 2019 x64 app using mongocxx driver

I'm trying to get a windows x64 C++ project working with the latest mongocxx driver using Visual Studio 2019. I installed the driver libraries using vcpkg:
vcpkg install mongo-cxx-driver[boost]
In VS 2019 I created a new console app and inserted the example code from the mongo driver page into main(). I built the app and ran it; everything works great. Then I noticed that it built as a win 32 app and switched it over to x64. Now the project won't build b/c it can't find the header files. Specifically (1rst error only...the others are similar)
Severity Code Description Project File Line Suppression State
Error C1083 Cannot open include file: 'bsoncxx/json.hpp': No such file or directory
What do I need to do to make it work on the x64 platform?
As I suspected, it was something I just didn't know to do. From Neumann-A on the vcpkg github site:
vcpkg install mongo-cxx-driver[boost]:x64-windows
or
vcpkg install mongo-cxx-driver[boost] --triplet x64-windows
or
set VCPKG_DEFAULT_TRIPLET=x64-windows
vcpkg install mongo-cxx-driver[boost]

How do I install Windows 10 SDK for use with Visual Studio 2017

I can't figure out how to install Windows 10 SDK for Visual Studio 2017.
I downloaded and ran the Windows 10 SDK installer, and it displays Please find winsdksetup.exe in ....\Windows kits\10\WindowsSDK to install Windows Software Development Kit - Windows 10.0.17134.12.
When I run winsdksetup.exe, it takes me through the same loop, where it downloads a bunch of executable installers into this directory and show the same exact message.
When I try to build a DirectX project in VS2017, I get the error:
MSB8036 The Windows SDK version 10.0.16299.0 was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution".
Do I need to install one of those installers? Which one do I need to run to build and debug DirectX projects for Visual Studio? Specifically to use VS2017 shader debugging functionality.
Thanks,
EDIT:
Under VS2017 - Tools -> Get Tools and Features
I have checked
Game Development with C++
and under Optional I have
C++ Profiling tools
Windows 10 SDK (10.0.17134.0)
I'm downloading 16299.0, this fixed the first error of not having the right SDK.
But now I get the runtime error Failed Creating the Direct3D device when running in Debug. I can still run samples in Release
The error message shows which SDK you need:
The Windows SDK version 10.0.16299.0 was not found
So the SDK for Windows 10 Fall Creators Update 1709 is missing and you downloaded the SDK for April 2018 Update (1803 Build 17134).
Run Visual Studio 2017 installer (C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe), click on modify, and select 16299 SDK under SDK/framework in individual components tab of the installer:
You can download the required Windows SDK versions from Microsoft:
https://developer.microsoft.com/en-us/windows/downloads/sdk-archive/
Just install the required version and the build should work.

Build OpenCascade for VS2017

Usecase: I intend to use the OpenCascade C++ library in my C++ project. I need to do simple polyline offsetting and polygon scaling down.
So I am attempting to install the OpenCascade C++ library on my Windows 10 64bit machine to use in Visual Studio 17. My first attempt was to use the windows installer then run the batch files (env.bat, custom.bat). But I have read on this forum that the windows installer wont work for Visual Studio 2017 - is that correct?
So I have now followed the build instructions here. And now I have opened the sample projects in Visual Studio 2017. When I try to build the project I get the following errors for each of the sample projects:
Error MSB8036 The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution". TKQADraw C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Platforms\x64\PlatformToolsets\v141\Toolset.targets 36
Any advice on what I have done wrong? Maybe I didn't build it properly following these steps? Also, given my usecase above, do I need to do all this if I just want to use OpenCascade in a limited way?
Is there documentation or a link on how I create a new Visual Studio C++ project and link all the OpenCascade libraries?
As the error says, you haven't installed the correct SDK version, or maybe the version you installed is out dated. Check the SDK install and try again.

visual studio 2015 and tesseract 3.05 on x64

well i really need help here.
my problem is how can i add tesseract 3.05 and leptonica 1.73 libraries to visual studio 2015 x64 (windows 10).
i manage to do that last summer with visual studio 2013 and the older version of leptonica and tesseract because it was kinda easy and all includes and lib was there i just had to give the path and download some dll. but now i couldn't even see the right include and lib that i should use. well i'm not pro in those things so please if anyone can help me and give me some steps to do.
some guys post this link:
https://github.com/peirick/leptonica
but no idea how to use it.
Given link working fine, there are few steps; you can compile tesseract and leptonica in visual studio 2015
Step1: Take material provided from this
Step2: Copy files from this into VS2015_Tesseract-master\leptonica\ folder
Step3: Copy files of tesseract from github into VS2015_Tesseract-master\tesseract_3.04 folder
Step4: Compile libtesseract or tesseract in x64 platform
Done!!
Today I built Tesseract 3.05
Windows 10 64 bit
Visual Studio 2015
I cloned this Repository:
https://github.com/peirick/VS2015_Tesseract
In the resulting directory ... VS2015_Tesseract I deleted
subdirectory leptonica
subdirectory tesseract_3.05
Then I opened a command prompt as administrator in VS2015_Tesseract and executed
build_tesseract.bat
1501 warnings
0 errors
To get the API work, I needed to add dependencies:
tesseract.lib;openjpeg.lib;libwebp.lib;libtiff.lib;libtesseract.lib;libpng.lib;liblept.lib;libjpeg.lib;jbig2enc.lib;giflib.lib;zlib.lib;

How to compile a C program with Visual Studio on Windows?

I am trying to compile a library for 2D localization called libdots which can be found on this website with Visual Studio 2015 on Windows for x86 or x64.
The following is stated in the readme file of the lib:
It is written in pure c and has no external library dependencies other
than 'libc'.
What I have done so far:
Installed OpenCV 3.0.0 to C:/opencv
Installed CMake for Windows
Installed MinGW
Set the following System Environment Variable:
OPENCV_DIR C:\opencv\build\x86\vc12
Added the following to the Path variable in Windows settings:
%OPENCV_DIR%;
C:\opencv\build\x86\vc12\lib;
C:\opencv\build\include;
C:\opencv\build\include\opencv;
C:\opencv\build\include\opencv2
Then I configured and generated the Makefile with cmake-gui and selected Visual Studio 14 2015 generator with "Use default native compilers":
This produced a Visual Studio Solution file (*.sln). Opening this file shows me the complete C project in the IDE. But when trying to build the project, I get the following errors:
Does somebody have a hint how to proceed and/or solve these issues?