Re: Using Tesseract in MFC
Re: Using Tesseract in MFC
Quote:
Originally Posted by
VictorN
This problem I didn't searched on internet, I admit that :D .. thank you for idea. However, I didn't found something about leptonica library on github ....
Re: Using Tesseract in MFC
If I compile tesseact library in VS2017, could I use this compiled lib and dll into VS2010 project ?
Re: Using Tesseract in MFC
Because I have compiled Leptonica, but when I compile tesseract, I get a bunch of errors ... and I guess is because VS2010 compiler is the point:
Code:
3>c:\flaviu\tesseract-master\src\arch\dotproductavx.cpp(30): error C4716: 'tesseract::DotProductAVX' : must return a value
3>
3>Build FAILED.
3>
3>Time Elapsed 00:00:00.36
2>C:\Flaviu\tesseract-master\src\ccutil\host.h(30): fatal error C1083: Cannot open include file: 'cinttypes': No such file or directory
the code:
Code:
namespace tesseract {
double DotProductAVX(const double* u, const double* v, int n) {
fprintf(stderr, "DotProductAVX can't be used on Android\n");
abort();
}
} // namespace tesseract
and
Code:
#include <cinttypes> // PRId32, ...
Re: Using Tesseract in MFC
<cinttypes> was introduced with c++11 - so you need at least a c++11 compatible compiler. VS2010 is not c++11 compatible so you'll need a later version of the compiler to compile this code.
Re: Using Tesseract in MFC
So, if I would compile this library with VS2017 let say, I could use this library inside of VS2010 project ?
Re: Using Tesseract in MFC
Quote:
Originally Posted by
mesajflaviu
So, if I would compile this library with VS2017 let say, I could use this library inside of VS2010 project ?
probably, yes.
Just try it!
Re: Using Tesseract in MFC
Note that each version of VS c++ uses it's own version of the crt - so the.dll compiled with VS2017 will use a different version of the crt to code compiled with VS2010. This may, or may not, be an issue - but for any computer on which you want to run these programs you'll need to have at least these different versions of the crt installed.
Re: Using Tesseract in MFC
Quote:
Originally Posted by
mesajflaviu
So, if I would compile this library with VS2017 let say, I could use this library inside of VS2010 project ?
Why ask? Just try it.
1 Attachment(s)
Re: Using Tesseract in MFC
From my experience, I knew that is impossible to go everything alright :D
I have installed VS2017 on my machine ... but when I have tried to create a simple MFC test project, I have met the following error:Attachment 35343
Ok, so I have tried to create a solution file for tesseract, with CMake, and here is the result:
Code:
CMake Error at CMakeLists.txt:41 (project):
Generator
Visual Studio 15 2017
could not find any instance of Visual Studio.
Configuring incomplete, errors occurred!
See also "C:/Flaviu/tesseract-master/bin/CMakeFiles/CMakeOutput.log".
I run on the empty road ...
Re: Using Tesseract in MFC
Re: Using Tesseract in MFC
No, of course not, and I have searched a solution for my problem, but I didn't found something relevant ... might haven't used right terms ...
Re: Using Tesseract in MFC
When you installed Vs2017, did you tell the installation configuration that you wanted c++/mfc/SDK etc etc for desktop? I don't think they are installed by default now.
Run the VS installer, click modify and under Installation Details, what have you installed for Desktop Development with C++?
Re: Using Tesseract in MFC
Quote:
Originally Posted by
2kaud
When you installed Vs2017, did you tell the installation configuration that you wanted c++/mfc/SDK etc etc for desktop? I don't think they are installed by default now.
Run the VS installer, click modify and under Installation Details, what have you installed for Desktop Development with C++?
Yes, I have checked these details, and I noticed that I haven't installed all components for my needs ... and I have installed them, and I have successfully compiled leptonica and tesseract library ... now it come to used them, inside of VS2010 project ... I am very curios if will work ...I will come back with feedback.