nmake error!"cannot convert from 'int' to 'ScrollView *'"

Asked by codingcat

i have finished cmake to build sikuli-ide and sikuli-script and get makefiles,but errors occoured when i try to nmake them.

d:\PROGRA~1\MICROS~1.0\VC\INCLUDE\utility(163) : error C2440: cannot convert from "int" to "ScrollView *"

here "ScrollView" is a type defined in Tesseract, i think maybe my VS complier's version mismatches tesseract's,but i don't know how to deal with that.
my environment is as follow:
VS 2010
tessertact-2.04
jdk7
opencv2.1.0
cmake 2.8.9
swig 1.3.40

many thx!

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
codingcat
Solved:
Last query:
Last reply:
Revision history for this message
codingcat (huan-le-song) said :
#1

oh,my os is windows7, 64bit but i config every thing as 32bit

Revision history for this message
RaiMan (raimund-hocke) said :
#2

You have to modify the respective Tesseract source code with the appropriate cast modifier.

Revision history for this message
codingcat (huan-le-song) said :
#3

do you mean that i have to build Tesseract with the appropriate compiler? my Tesseract is built by VS2008 compiler while i use VS2010 to build sikuli ,does it matter?
i find that Tesseract-2.0.4 can't been built by VS2010 , what can i do?

Revision history for this message
RaiMan (raimund-hocke) said :
#4

All my trials including the current ones with the new version to build Tesseract always needed some (minor) modifications to the source code of Tesseract.

You might try with the latest version Tesseract 3.

Revision history for this message
codingcat (huan-le-song) said :
#5

but way the txt "build-win32.txt" in sikuli's source code package says Tesseract "3.0 won't work" ?
could you please email me a package of Tesseract which has been built with VS2010 and works with sikuli?my e-mail is huan.le.song@163.com

thx!

Revision history for this message
RaiMan (raimund-hocke) said :
#6

Sorry, I do not have Tesseract libs 64-Bit, built with VS.

In Feb 2010 I succeeded to build a 64-Bit Sikuli (from faq 1453):

A 64-Bit version of sikuli-script.jar and Sikuli-IDE (X-1.0rc2) is running fully 64-Bit now (Java 64-Bit only, OpenCV2.2 and tesseract2.04 both 64Bit).

Tools used:
-- Visual C++ 2010 Express (VC)
-- Windows SDK 7.1 / .Net 4
-- cmake2.8(32Bit) running from a commandline prepared with SetEnv.cmd from the SDK
-- swig 2.01(32Bit)
-- I used cmake -G "Visual Studio 10 Win64" to generate .vcxproj projectfiles for VC
-- I processed all builds in the VC gui with Release/x64
-- nmake did not work for me (linker problems)

I had to fix/hack the following:
Source --- tesseract/scrollview.cpp: some compile errors that could be fixed using the recommendation (reinterpret_cast)
VC --- in VC project settings I had to switch in the configuration settings the platformtoolset to "Windows7.1SDK" manually for each build, because VC is not taking this setting from environment automatically (otherwise the linker would not find the 64-Bit versions of standard libs)
VC --- when opening a cmake generated .vcxproj, the target is Debug, though environment tells Release - has to be manually switched
VC --- VC generates a Release and a Debug folder in the relevant target folders - I had to fix the dll-to-jar copy
Cmake --- the javah.exe was not found by cmake, though path was set - put absolute path into cmakelist

But I never tried it again.
With the new version (https://github.com/RaiMan/Sikuli12.11) I am using mingw.

Revision history for this message
codingcat (huan-le-song) said :
#7

i fixed the source code of tesseract and it works . thx!