Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows compiling #9

Open
samishchandra opened this issue May 1, 2013 · 4 comments
Open

Windows compiling #9

samishchandra opened this issue May 1, 2013 · 4 comments

Comments

@samishchandra
Copy link

Orig Title: not an issue, but can u let me know how to make the lib work in windows.
I kind of skimmed through the code, and confident that it works well, because it doesn't extra errors since it acts like a perfect wrapper for the original tesseract.

Thanks.

@gregjurman
Copy link
Owner

I am not sure entirely how to compile on windows, but it may just be a case of making sure the required dllspec stuff is in the headers and that the dll file for tesseract's Base API is in the proper path.

I can't actively test in Windows unfortunetly, but I will keep this ticket open as a feature-request.

@debjan
Copy link

debjan commented Jan 4, 2014

I downloaded compiled tesseract libs, provided on tesseract-ocr project page (link) and put those inside tesswrap base folder, which I cloned in "c:\src\git\tesswrap".

I then changed setup.py like this:

--- C:\src\Git\tesserwrap\setup.py.bak
+++ C:\src\Git\tesserwrap\setup.py
@@ -37,16 +37,16 @@
 def read(fname):
     return open(os.path.join(os.path.dirname(__file__), fname)).read()

-extra_lib_paths = ['/usr/local/lib']
+extra_lib_paths = ['./lib']

-tesseract_possible_names = ['tesseract_api', 'tesseract']
+tesseract_possible_names = ['tesseract_api', 'tesseract', 'libtesseract302']
 tesseract_lib_name = find_closest_libname(
     tesseract_possible_names,
     extra_lib_paths)

 tesser_cpp = Extension(
     'libtesserwrap',
-    include_dirs=['/usr/local/include'],
+    include_dirs=['./include'],
     libraries=[tesseract_lib_name],
     library_dirs=extra_lib_paths,
     sources=[

By default, distutils compiles with MSVC if present, and this is the base line from my build log:

LINK : error LNK2001: unresolved external symbol initlibtesserwrap

If I set distutils to use mingw32, I get this build log

Any pointers for c++ illiterate?

TIA

@maupaso
Copy link

maupaso commented Aug 11, 2016

Is there any news about this lib in windows?

@debjan
Copy link

debjan commented Aug 14, 2016

@maupaso I managed to build this: https://github.com/virtuald/python-tesseract-sip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants