mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-27 20:59:36 +08:00
+ fix VS2008 warning about "non dll-interface class tesseract::LTRResultIterator used as base for dll-interface class tesseract::ResultIterator" by making LTRResultIterator also visible.
+ Changed Project preprocessor definition of WINDLLNAME, because stringizing operator doesn't seem to work when initializing tessedit_module_name in ccutil/ccutil.cpp (which was omitted in previous fixes). + Update vs2008/tesshelper.py for new public header files. patch from Tom Powers (https://groups.google.com/group/tesseract-dev/msg/6da2799cd2cb9844) git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@702 d0cd1f9f-072b-0410-8dd7-cf729c803f20
This commit is contained in:
parent
2f1c112640
commit
2972cc426b
@ -21,6 +21,7 @@
|
||||
#ifndef TESSERACT_CCMAIN_LTR_RESULT_ITERATOR_H__
|
||||
#define TESSERACT_CCMAIN_LTR_RESULT_ITERATOR_H__
|
||||
|
||||
#include "platform.h"
|
||||
#include "pageiterator.h"
|
||||
#include "unicharset.h"
|
||||
|
||||
@ -42,7 +43,7 @@ class Tesseract;
|
||||
// See also base class PageIterator, which contains the bulk of the interface.
|
||||
// LTRResultIterator adds text-specific methods for access to OCR output.
|
||||
|
||||
class LTRResultIterator : public PageIterator {
|
||||
class TESS_API LTRResultIterator : public PageIterator {
|
||||
friend class ChoiceIterator;
|
||||
public:
|
||||
// page_res and tesseract come directly from the BaseAPI.
|
||||
|
@ -9,7 +9,7 @@ CCUtil::CCUtil() :
|
||||
STRING_INIT_MEMBER(m_data_sub_dir,
|
||||
"tessdata/", "Directory for data files", ¶ms_),
|
||||
#ifdef _WIN32
|
||||
STRING_INIT_MEMBER(tessedit_module_name, "tessdll.dll",
|
||||
STRING_INIT_MEMBER(tessedit_module_name, WINDLLNAME,
|
||||
"Module colocated with tessdata dir", ¶ms_),
|
||||
#endif
|
||||
INT_INIT_MEMBER(ambigs_debug_level, 0, "Debug level for unichar ambiguities",
|
||||
|
@ -83,8 +83,7 @@ class CCUtil {
|
||||
// params_ should be initialized before parameters are added to it.
|
||||
STRING_VAR_H(m_data_sub_dir, "tessdata/", "Directory for data files");
|
||||
#ifdef _WIN32
|
||||
#define makestring(x) #x
|
||||
STRING_VAR_H(tessedit_module_name, makestring(WINDLLNAME),
|
||||
STRING_VAR_H(tessedit_module_name, WINDLLNAME,
|
||||
"Module colocated with tessdata dir");
|
||||
#endif
|
||||
INT_VAR_H(ambigs_debug_level, 0, "Debug level for unichar ambiguities");
|
||||
|
@ -46,7 +46,7 @@
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\api;..\..\ccmain;..\..\ccutil;..\..\ccstruct;..\..\classify;..\..\cube;..\..\cutil;..\..\dict;..\..\image;..\..\neural_networks\runtime;..\..\textord;..\..\viewer;..\..\wordrec;.;..\..\..\include;..\..\..\include\leptonica;..\port"
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;_LIB;USE_STD_NAMESPACE;WINDLLNAME=$(TargetFileName)"
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;_LIB;USE_STD_NAMESPACE;WINDLLNAME=\"$(TargetFileName)\""
|
||||
MinimalRebuild="false"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
@ -120,7 +120,7 @@
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories="..\..\api;..\..\ccmain;..\..\ccutil;..\..\ccstruct;..\..\classify;..\..\cube;..\..\cutil;..\..\dict;..\..\image;..\..\neural_networks\runtime;..\..\textord;..\..\viewer;..\..\wordrec;.;..\..\..\include;..\..\..\include\leptonica;..\port"
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_LIB;USE_STD_NAMESPACE;WINDLLNAME=$(TargetFileName)"
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_LIB;USE_STD_NAMESPACE;WINDLLNAME=\"$(TargetFileName)\""
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
@ -191,7 +191,7 @@
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories="..\..\api;..\..\ccmain;..\..\ccutil;..\..\ccstruct;..\..\classify;..\..\cube;..\..\cutil;..\..\dict;..\..\image;..\..\neural_networks\runtime;..\..\textord;..\..\viewer;..\..\wordrec;.;..\..\..\include;..\..\..\include\leptonica;..\port"
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_USRDLL;_WINDLL;USE_STD_NAMESPACE;TESS_EXPORTS;LIBLEPT_IMPORTS;WINDLLNAME=$(TargetFileName)"
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_USRDLL;_WINDLL;USE_STD_NAMESPACE;TESS_EXPORTS;LIBLEPT_IMPORTS;WINDLLNAME=\"$(TargetFileName)\""
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
@ -273,7 +273,7 @@
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\api;..\..\ccmain;..\..\ccutil;..\..\ccstruct;..\..\classify;..\..\cube;..\..\cutil;..\..\dict;..\..\image;..\..\neural_networks\runtime;..\..\textord;..\..\viewer;..\..\wordrec;.;..\..\..\include;..\..\..\include\leptonica;..\port"
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;_USRDLL;_WINDLL;USE_STD_NAMESPACE;TESS_EXPORTS;LIBLEPT_IMPORTS;WINDLLNAME=$(TargetFileName)"
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;_USRDLL;_WINDLL;USE_STD_NAMESPACE;TESS_EXPORTS;LIBLEPT_IMPORTS;WINDLLNAME=\"$(TargetFileName)\""
|
||||
MinimalRebuild="false"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
|
@ -2,9 +2,9 @@
|
||||
|
||||
"""
|
||||
tesshelper.py -- Utility operations to compare, report stats, and copy
|
||||
public headers for tesseract 3.01 VS2008 Project
|
||||
public headers for tesseract 3.0x VS2008 Project
|
||||
|
||||
$RCSfile: tesshelper.py,v $ $Revision: 0d0a22d1a5da $ $Date: 2012/02/23 03:30:03 $
|
||||
$RCSfile: tesshelper.py,v $ $Revision: 7ca575b377aa $ $Date: 2012/03/07 17:26:31 $
|
||||
"""
|
||||
|
||||
r"""
|
||||
@ -30,18 +30,18 @@ Format for a .vcproj file entry:
|
||||
epilogStr = r"""
|
||||
Examples:
|
||||
|
||||
Assume that tesshelper.py is in c:\buildfolder\tesseract-3.01\vs2008,
|
||||
Assume that tesshelper.py is in c:\buildfolder\tesseract-3.02\vs2008,
|
||||
which is also the current directory. Then,
|
||||
|
||||
python tesshelper .. compare
|
||||
|
||||
will compare c:\buildfolder\tesseract-3.01 "library" directories to the
|
||||
will compare c:\buildfolder\tesseract-3.02 "library" directories to the
|
||||
libtesseract Project
|
||||
(c:\buildfolder\tesseract-3.01\vs2008\libtesseract\libtesseract.vcproj).
|
||||
(c:\buildfolder\tesseract-3.02\vs2008\libtesseract\libtesseract.vcproj).
|
||||
|
||||
python tesshelper .. report
|
||||
|
||||
will display summary stats for c:\buildfolder\tesseract-3.01 "library"
|
||||
will display summary stats for c:\buildfolder\tesseract-3.02 "library"
|
||||
directories and the libtesseract Project.
|
||||
|
||||
python tesshelper .. copy ..\..\include
|
||||
@ -68,7 +68,7 @@ import sys
|
||||
|
||||
# ====================================================================
|
||||
|
||||
VERSION = "1.0 %s" % "$Date: 2012/02/23 03:30:03 $".split()[1]
|
||||
VERSION = "1.0 %s" % "$Date: 2012/03/07 17:26:31 $".split()[1]
|
||||
PROJ_SUBDIR = r"vs2008\libtesseract"
|
||||
PROJFILE = "libtesseract.vcproj"
|
||||
|
||||
@ -319,6 +319,21 @@ def tessCopy(tessDir, includeDir):
|
||||
#r"ccutil\genericvector.h",
|
||||
}
|
||||
|
||||
resultIteratorIncludeSet = {
|
||||
r"ccmain\ltrresultiterator.h",
|
||||
r"ccmain\pageiterator.h",
|
||||
r"ccmain\resultiterator.h",
|
||||
r"ccutil\genericvector.h",
|
||||
r"ccutil\tesscallback.h",
|
||||
r"ccutil\errcode.h",
|
||||
r"ccutil\host.h",
|
||||
r"ccutil\helpers.h",
|
||||
r"ccutil\ndminx.h",
|
||||
r"ccutil\params.h",
|
||||
r"ccutil\unicharmap.h",
|
||||
r"ccutil\unicharset.h",
|
||||
}
|
||||
|
||||
genericVectorIncludeSet = {
|
||||
r"ccutil\genericvector.h",
|
||||
r"ccutil\tesscallback.h",
|
||||
@ -358,7 +373,7 @@ def tessCopy(tessDir, includeDir):
|
||||
os.mkdir(tessIncludeDir)
|
||||
|
||||
#fileSet = baseIncludeSet | strngIncludeSet | genericVectorIncludeSet | blobsIncludeSet
|
||||
fileSet = baseIncludeSet | strngIncludeSet
|
||||
fileSet = baseIncludeSet | strngIncludeSet | resultIteratorIncludeSet
|
||||
|
||||
copyIncludes(fileSet, "public", tessDir, tessIncludeDir)
|
||||
copyIncludes(extraFilesSet, "extra", tessDir, includeDir)
|
||||
|
Loading…
Reference in New Issue
Block a user