fix vs2010 (and maybe vs2008) build

git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@983 d0cd1f9f-072b-0410-8dd7-cf729c803f20
This commit is contained in:
zdenop@gmail.com 2014-01-12 20:13:55 +00:00
parent f2e4dba850
commit 94d08567e1
13 changed files with 58 additions and 146 deletions

View File

@ -54,10 +54,10 @@
#include "strngs.h" #include "strngs.h"
#include "openclwrapper.h" #include "openclwrapper.h"
#ifdef _WIN32 #ifdef _WIN32
#include <windows.h> #include <windows.h>
#include <stdlib.h> #include <stdlib.h>
#include "mathfix.h"
#else #else
#include <dirent.h> #include <dirent.h>
#include <libgen.h> #include <libgen.h>

View File

@ -773,7 +773,7 @@ class TESS_API TessBaseAPI {
TESS_LOCAL int FindLines(); TESS_LOCAL int FindLines();
/** Delete the pageres and block list ready for a new page. */ /** Delete the pageres and block list ready for a new page. */
TESS_API void ClearResults(); void ClearResults();
/** /**
* Return an LTR Result Iterator -- used only for training, as we really want * Return an LTR Result Iterator -- used only for training, as we really want

View File

@ -14,6 +14,10 @@
#include "version.h" #include "version.h"
#endif #endif
#ifdef _WIN32
#include "mathfix.h"
#endif
namespace tesseract { namespace tesseract {
// Use for PDF object fragments. Must be large enough // Use for PDF object fragments. Must be large enough
@ -130,7 +134,7 @@ char* TessPDFRenderer::GetPDFTextObjects(TessBaseAPI* api,
x = line_x2 + t * (line_x2 - line_x1); x = line_x2 + t * (line_x2 - line_x1);
y = line_y2 + t * (line_y2 - line_y1); y = line_y2 + t * (line_y2 - line_y1);
} }
word_length = sqrt(dist2(word_x1, word_y1, word_x2, word_y2)); word_length = sqrt(double(dist2(word_x1, word_y1, word_x2, word_y2)));
word_length = word_length * 72.0 / ppi; word_length = word_length * 72.0 / ppi;
x = x * 72 / ppi; x = x * 72 / ppi;
y = height - (y * 72.0 / ppi); y = height - (y * 72.0 / ppi);
@ -152,7 +156,7 @@ char* TessPDFRenderer::GetPDFTextObjects(TessBaseAPI* api,
// [ sin𝜃 cos𝜃 0 ] [ 0 1 0 ] [ 0 1 0 ] // [ sin𝜃 cos𝜃 0 ] [ 0 1 0 ] [ 0 1 0 ]
// [ 0 0 1 ] [ 0 0 1 ] [ x y 1 ] // [ 0 0 1 ] [ 0 0 1 ] [ x y 1 ]
// //
double theta = atan2(line_y1 - line_y2, line_x2 - line_x1); double theta = atan2(double(line_y1 - line_y2), double(line_x2 - line_x1));
double a, b, c, d; double a, b, c, d;
a = cos(theta); a = cos(theta);
b = sin(theta); b = sin(theta);
@ -193,7 +197,7 @@ char* TessPDFRenderer::GetPDFTextObjects(TessBaseAPI* api,
pdf_str.add_str_double(" ", prec(y)); // . pdf_str.add_str_double(" ", prec(y)); // .
pdf_str += (" Tm "); // Place cursor absolutely pdf_str += (" Tm "); // Place cursor absolutely
} else { } else {
double offset = sqrt(dist2(old_x, old_y, x, y)); double offset = sqrt(double(dist2(old_x, old_y, x, y)));
pdf_str.add_str_double(" ", prec(offset)); // Delta x in pts pdf_str.add_str_double(" ", prec(offset)); // Delta x in pts
pdf_str.add_str_double(" ", 0); // Delta y in pts pdf_str.add_str_double(" ", 0); // Delta y in pts
pdf_str += (" Td "); // Relative moveto pdf_str += (" Td "); // Relative moveto

View File

@ -294,7 +294,7 @@ void ImageThresholder::ThresholdRectToPix(Pix* src_pix,
for (int x = 0; x < rect_width_; ++x) { for (int x = 0; x < rect_width_; ++x) {
bool white_result = true; bool white_result = true;
for (int ch = 0; ch < num_channels; ++ch) { for (int ch = 0; ch < num_channels; ++ch) {
int pixel = GET_DATA_BYTE(linedata, int pixel = GET_DATA_BYTE(const_cast<void*> (reinterpret_cast<const void *>(linedata)),
(x + rect_left_) * num_channels + ch); (x + rect_left_) * num_channels + ch);
if (hi_values[ch] >= 0 && if (hi_values[ch] >= 0 &&
(pixel > thresholds[ch]) == (hi_values[ch] == 0)) { (pixel > thresholds[ch]) == (hi_values[ch] == 0)) {

View File

@ -167,7 +167,7 @@ void HistogramRect(Pix* src_pix, int channel,
for (int y = top; y < bottom; ++y) { for (int y = top; y < bottom; ++y) {
const l_uint32* linedata = srcdata + y * src_wpl; const l_uint32* linedata = srcdata + y * src_wpl;
for (int x = 0; x < width; ++x) { for (int x = 0; x < width; ++x) {
int pixel = GET_DATA_BYTE(linedata, (x + left) * num_channels + channel); int pixel = GET_DATA_BYTE(const_cast<void*> (reinterpret_cast<const void *>(linedata)), (x + left) * num_channels + channel);
++histogram[pixel]; ++histogram[pixel];
} }
} }

View File

@ -87,7 +87,7 @@ const ERRCODE ASSERT_FAILED = "Assert failed";
__FILE__, __LINE__); \ __FILE__, __LINE__); \
} }
#define ASSERT_HOST_MSG(x, msg...) if (!(x)) \ #define ASSERT_HOST_MSG(x, msg, ...) if (!(x)) \
{ \ { \
tprintf(msg); \ tprintf(msg); \
ASSERT_FAILED.error(#x, ABORT, "in file %s, line %d", \ ASSERT_FAILED.error(#x, ABORT, "in file %s, line %d", \

View File

@ -34,7 +34,7 @@
// provides automatic deletion of pointers, [De]Serialize that works, and // provides automatic deletion of pointers, [De]Serialize that works, and
// sort that works. // sort that works.
template <typename T> template <typename T>
class GenericVector { class TESS_API GenericVector {
public: public:
GenericVector() { GenericVector() {
init(kDefaultVectorSize); init(kDefaultVectorSize);

View File

@ -45,7 +45,7 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="..\..\api;..\..\ccmain;..\..\ccutil;..\..\ccstruct;..\..\classify;..\..\cube;..\..\cutil;..\..\dict;..\..\image;..\..\neural_networks\runtime;..\..\textord;..\..\viewer;..\..\wordrec;.;..\..\..\include;..\..\..\include\leptonica;..\port" AdditionalIncludeDirectories="..\..\api;..\..\ccmain;..\..\ccutil;..\..\ccstruct;..\..\classify;..\..\cube;..\..\cutil;..\..\dict;..\..\opencl;..\..\neural_networks\runtime;..\..\textord;..\..\viewer;..\..\wordrec;.;..\..\..\include;..\..\..\include\leptonica;..\port"
PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;_LIB;USE_STD_NAMESPACE;WINDLLNAME=\&quot;$(TargetFileName)\&quot;" PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;_LIB;USE_STD_NAMESPACE;WINDLLNAME=\&quot;$(TargetFileName)\&quot;"
MinimalRebuild="false" MinimalRebuild="false"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
@ -119,7 +119,7 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="2" Optimization="2"
AdditionalIncludeDirectories="..\..\api;..\..\ccmain;..\..\ccutil;..\..\ccstruct;..\..\classify;..\..\cube;..\..\cutil;..\..\dict;..\..\image;..\..\neural_networks\runtime;..\..\textord;..\..\viewer;..\..\wordrec;.;..\..\..\include;..\..\..\include\leptonica;..\port" AdditionalIncludeDirectories="..\..\api;..\..\ccmain;..\..\ccutil;..\..\ccstruct;..\..\classify;..\..\cube;..\..\cutil;..\..\dict;..\..\opencl;..\..\neural_networks\runtime;..\..\textord;..\..\viewer;..\..\wordrec;.;..\..\..\include;..\..\..\include\leptonica;..\port"
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_LIB;USE_STD_NAMESPACE;WINDLLNAME=\&quot;$(TargetFileName)\&quot;" PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_LIB;USE_STD_NAMESPACE;WINDLLNAME=\&quot;$(TargetFileName)\&quot;"
RuntimeLibrary="2" RuntimeLibrary="2"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
@ -190,7 +190,7 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="2" Optimization="2"
AdditionalIncludeDirectories="..\..\api;..\..\ccmain;..\..\ccutil;..\..\ccstruct;..\..\classify;..\..\cube;..\..\cutil;..\..\dict;..\..\image;..\..\neural_networks\runtime;..\..\textord;..\..\viewer;..\..\wordrec;.;..\..\..\include;..\..\..\include\leptonica;..\port" AdditionalIncludeDirectories="..\..\api;..\..\ccmain;..\..\ccutil;..\..\ccstruct;..\..\classify;..\..\cube;..\..\cutil;..\..\dict;..\..\opencl;..\..\neural_networks\runtime;..\..\textord;..\..\viewer;..\..\wordrec;.;..\..\..\include;..\..\..\include\leptonica;..\port"
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_USRDLL;_WINDLL;USE_STD_NAMESPACE;TESS_EXPORTS;LIBLEPT_IMPORTS;WINDLLNAME=\&quot;$(TargetFileName)\&quot;" PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_USRDLL;_WINDLL;USE_STD_NAMESPACE;TESS_EXPORTS;LIBLEPT_IMPORTS;WINDLLNAME=\&quot;$(TargetFileName)\&quot;"
RuntimeLibrary="2" RuntimeLibrary="2"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
@ -272,7 +272,7 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="..\..\api;..\..\ccmain;..\..\ccutil;..\..\ccstruct;..\..\classify;..\..\cube;..\..\cutil;..\..\dict;..\..\image;..\..\neural_networks\runtime;..\..\textord;..\..\viewer;..\..\wordrec;.;..\..\..\include;..\..\..\include\leptonica;..\port" AdditionalIncludeDirectories="..\..\api;..\..\ccmain;..\..\ccutil;..\..\ccstruct;..\..\classify;..\..\cube;..\..\cutil;..\..\dict;..\..\opencl;..\..\neural_networks\runtime;..\..\textord;..\..\viewer;..\..\wordrec;.;..\..\..\include;..\..\..\include\leptonica;..\port"
PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;_USRDLL;_WINDLL;USE_STD_NAMESPACE;TESS_EXPORTS;LIBLEPT_IMPORTS;WINDLLNAME=\&quot;$(TargetFileName)\&quot;" PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;_USRDLL;_WINDLL;USE_STD_NAMESPACE;TESS_EXPORTS;LIBLEPT_IMPORTS;WINDLLNAME=\&quot;$(TargetFileName)\&quot;"
MinimalRebuild="false" MinimalRebuild="false"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
@ -760,10 +760,6 @@
RelativePath="..\..\wordrec\gradechop.cpp" RelativePath="..\..\wordrec\gradechop.cpp"
> >
</File> </File>
<File
RelativePath="..\..\ccutil\hashfn.cpp"
>
</File>
<File <File
RelativePath="..\..\cube\hybrid_neural_net_classifier.cpp" RelativePath="..\..\cube\hybrid_neural_net_classifier.cpp"
> >
@ -772,22 +768,10 @@
RelativePath="..\..\dict\hyphen.cpp" RelativePath="..\..\dict\hyphen.cpp"
> >
</File> </File>
<File
RelativePath="..\..\image\image.cpp"
>
</File>
<File <File
RelativePath="..\..\textord\imagefind.cpp" RelativePath="..\..\textord\imagefind.cpp"
> >
</File> </File>
<File
RelativePath="..\..\image\imgs.cpp"
>
</File>
<File
RelativePath="..\..\ccmain\imgscale.cpp"
>
</File>
<File <File
RelativePath="..\..\ccutil\indexmapbidi.cpp" RelativePath="..\..\ccutil\indexmapbidi.cpp"
> >
@ -1040,10 +1024,6 @@
RelativePath="..\..\ccstruct\quadlsq.cpp" RelativePath="..\..\ccstruct\quadlsq.cpp"
> >
</File> </File>
<File
RelativePath="..\..\ccstruct\quadratc.cpp"
>
</File>
<File <File
RelativePath="..\..\ccstruct\quspline.cpp" RelativePath="..\..\ccstruct\quspline.cpp"
> >
@ -1080,10 +1060,6 @@
RelativePath="..\..\classify\sampleiterator.cpp" RelativePath="..\..\classify\sampleiterator.cpp"
> >
</File> </File>
<File
RelativePath="..\..\ccmain\scaleimg.cpp"
>
</File>
<File <File
RelativePath="..\..\textord\scanedg.cpp" RelativePath="..\..\textord\scanedg.cpp"
> >
@ -1164,10 +1140,6 @@
RelativePath="..\..\viewer\svpaint.cpp" RelativePath="..\..\viewer\svpaint.cpp"
> >
</File> </File>
<File
RelativePath="..\..\image\svshowim.cpp"
>
</File>
<File <File
RelativePath="..\..\viewer\svutil.cpp" RelativePath="..\..\viewer\svutil.cpp"
> >
@ -1396,6 +1368,18 @@
RelativePath="..\..\wordrec\params_model.cpp" RelativePath="..\..\wordrec\params_model.cpp"
> >
</File> </File>
<File
RelativePath="..\..\api\pdfrenderer.cpp"
>
</File>
<File
RelativePath="..\..\ccmain\par_control.cpp"
>
</File>
<File
RelativePath="..\..\opencl\openclwrapper.cpp"
>
</File>
</Filter> </Filter>
<Filter <Filter
Name="Header Files" Name="Header Files"
@ -1866,34 +1850,10 @@
RelativePath="..\..\cube\hybrid_neural_net_classifier.h" RelativePath="..\..\cube\hybrid_neural_net_classifier.h"
> >
</File> </File>
<File
RelativePath="..\..\image\image.h"
>
</File>
<File <File
RelativePath="..\..\textord\imagefind.h" RelativePath="..\..\textord\imagefind.h"
> >
</File> </File>
<File
RelativePath="..\..\image\img.h"
>
</File>
<File
RelativePath="..\..\image\imgerrs.h"
>
</File>
<File
RelativePath="..\..\image\imgs.h"
>
</File>
<File
RelativePath="..\..\ccmain\imgscale.h"
>
</File>
<File
RelativePath="..\..\image\imgunpk.h"
>
</File>
<File <File
RelativePath="..\..\ccutil\indexmapbidi.h" RelativePath="..\..\ccutil\indexmapbidi.h"
> >
@ -2226,10 +2186,6 @@
RelativePath="..\..\classify\sampleiterator.h" RelativePath="..\..\classify\sampleiterator.h"
> >
</File> </File>
<File
RelativePath="..\..\ccmain\scaleimg.h"
>
</File>
<File <File
RelativePath="..\..\textord\scanedg.h" RelativePath="..\..\textord\scanedg.h"
> >
@ -2322,10 +2278,6 @@
RelativePath="..\..\viewer\svmnode.h" RelativePath="..\..\viewer\svmnode.h"
> >
</File> </File>
<File
RelativePath="..\..\image\svshowim.h"
>
</File>
<File <File
RelativePath="..\..\viewer\svutil.h" RelativePath="..\..\viewer\svutil.h"
> >
@ -2558,6 +2510,18 @@
RelativePath="..\..\wordrec\params_model.h" RelativePath="..\..\wordrec\params_model.h"
> >
</File> </File>
<File
RelativePath="..\..\opencl\oclkernels.h"
>
</File>
<File
RelativePath="..\..\opencl\opencl_device_selection.h"
>
</File>
<File
RelativePath="..\..\opencl\openclwrapper.h"
>
</File>
</Filter> </Filter>
<Filter <Filter
Name="Resource Files" Name="Resource Files"

View File

@ -17,7 +17,6 @@
// //
/////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////
#ifndef VS2008_INCLUDE_MATHFIX_H_ #ifndef VS2008_INCLUDE_MATHFIX_H_
#define VS2008_INCLUDE_MATHFIXT_H_ #define VS2008_INCLUDE_MATHFIXT_H_
@ -30,6 +29,7 @@
#define isnan(x) _isnan(x) #define isnan(x) _isnan(x)
#define isinf(x) (!_finite(x)) #define isinf(x) (!_finite(x))
#define fmax max //VC++ does not implement all the provisions of C99 Standard #define fmax max //VC++ does not implement all the provisions of C99 Standard
#define round(x) roundf(x)
inline float roundf(float num) { return num > 0 ? floorf(num + 0.5f) : ceilf(num - 0.5f); } inline float roundf(float num) { return num > 0 ? floorf(num + 0.5f) : ceilf(num - 0.5f); }
#endif // VS2008_INCLUDE_MATHFIXT_H_ #endif // VS2008_INCLUDE_MATHFIXT_H_

View File

@ -127,8 +127,8 @@ def getTessLibFiles(tessDir, nTrimChars):
"cube", "cube",
"cutil", "cutil",
"dict", "dict",
"image",
r"neural_networks\runtime", r"neural_networks\runtime",
"opencl",
"textord", "textord",
"viewer", "viewer",
"wordrec", "wordrec",

View File

@ -106,7 +106,7 @@
</CustomBuildStep> </CustomBuildStep>
<ClCompile> <ClCompile>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\api;..\..\ccmain;..\..\ccutil;..\..\ccstruct;..\..\classify;..\..\cube;..\..\cutil;..\..\dict;..\..\image;..\..\neural_networks\runtime;..\..\textord;..\..\viewer;..\..\wordrec;.;..\..\..\include;..\..\..\include\leptonica;..\port;..\..\opencl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\..\api;..\..\ccmain;..\..\ccutil;..\..\ccstruct;..\..\classify;..\..\cube;..\..\cutil;..\..\dict;..\..\neural_networks\runtime;..\..\textord;..\..\viewer;..\..\wordrec;.;..\..\..\include;..\..\..\include\leptonica;..\port;..\..\opencl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;_LIB;USE_STD_NAMESPACE;WINDLLNAME="$(TargetFileName)";%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;_LIB;USE_STD_NAMESPACE;WINDLLNAME="$(TargetFileName)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild> <MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@ -139,7 +139,7 @@ copy "$(TargetPath)" ..\..\..\lib
</CustomBuildStep> </CustomBuildStep>
<ClCompile> <ClCompile>
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<AdditionalIncludeDirectories>..\..\api;..\..\ccmain;..\..\ccutil;..\..\ccstruct;..\..\classify;..\..\cube;..\..\cutil;..\..\dict;..\..\image;..\..\neural_networks\runtime;..\..\textord;..\..\viewer;..\..\wordrec;.;..\..\..\include;..\..\..\include\leptonica;..\port;..\..\opencl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\..\api;..\..\ccmain;..\..\ccutil;..\..\ccstruct;..\..\classify;..\..\cube;..\..\cutil;..\..\dict;..\..\neural_networks\runtime;..\..\textord;..\..\viewer;..\..\wordrec;.;..\..\..\include;..\..\..\include\leptonica;..\port;..\..\opencl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;_LIB;USE_STD_NAMESPACE;WINDLLNAME="$(TargetFileName)";%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;_LIB;USE_STD_NAMESPACE;WINDLLNAME="$(TargetFileName)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader> <PrecompiledHeader>
@ -173,7 +173,7 @@ copy "$(TargetPath)" ..\..\..\lib
</CustomBuildStep> </CustomBuildStep>
<ClCompile> <ClCompile>
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<AdditionalIncludeDirectories>$(AMDAPPSDKROOT)\include;$(INTELOCLSDKROOT)\include;..\..\api;..\..\ccmain;..\..\ccutil;..\..\ccstruct;..\..\classify;..\..\cube;..\..\cutil;..\..\dict;..\..\image;..\..\neural_networks\runtime;..\..\textord;..\..\viewer;..\..\wordrec;.;..\..\..\include;..\..\..\include\leptonica;..\port;..\..\opencl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(AMDAPPSDKROOT)\include;$(INTELOCLSDKROOT)\include;..\..\api;..\..\ccmain;..\..\ccutil;..\..\ccstruct;..\..\classify;..\..\cube;..\..\cutil;..\..\dict;..\..\neural_networks\runtime;..\..\textord;..\..\viewer;..\..\wordrec;.;..\..\..\include;..\..\..\include\leptonica;..\port;..\..\opencl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>USE_OPENCL;WIN32;_WINDOWS;NDEBUG;_LIB;USE_STD_NAMESPACE;WINDLLNAME="$(TargetFileName)";%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>USE_OPENCL;WIN32;_WINDOWS;NDEBUG;_LIB;USE_STD_NAMESPACE;WINDLLNAME="$(TargetFileName)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader> <PrecompiledHeader>
@ -207,7 +207,7 @@ copy "$(TargetPath)" ..\..\..\lib
</CustomBuildStep> </CustomBuildStep>
<ClCompile> <ClCompile>
<Optimization>Full</Optimization> <Optimization>Full</Optimization>
<AdditionalIncludeDirectories>..\..\api;..\..\ccmain;..\..\ccutil;..\..\ccstruct;..\..\classify;..\..\cube;..\..\cutil;..\..\dict;..\..\image;..\..\neural_networks\runtime;..\..\textord;..\..\viewer;..\..\wordrec;.;..\..\..\include;..\..\..\include\leptonica;..\port;..\..\opencl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\..\api;..\..\ccmain;..\..\ccutil;..\..\ccstruct;..\..\classify;..\..\cube;..\..\cutil;..\..\dict;..\..\neural_networks\runtime;..\..\textord;..\..\viewer;..\..\wordrec;.;..\..\..\include;..\..\..\include\leptonica;..\port;..\..\opencl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;_USRDLL;_WINDLL;USE_STD_NAMESPACE;TESS_EXPORTS;LIBLEPT_IMPORTS;WINDLLNAME="$(TargetFileName)";%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;_USRDLL;_WINDLL;USE_STD_NAMESPACE;TESS_EXPORTS;LIBLEPT_IMPORTS;WINDLLNAME="$(TargetFileName)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader> <PrecompiledHeader>
@ -247,7 +247,7 @@ copy "$(TargetDir)$(TargetName).lib" ..\..\..\lib
</CustomBuildStep> </CustomBuildStep>
<ClCompile> <ClCompile>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\api;..\..\ccmain;..\..\ccutil;..\..\ccstruct;..\..\classify;..\..\cube;..\..\cutil;..\..\dict;..\..\image;..\..\neural_networks\runtime;..\..\textord;..\..\viewer;..\..\wordrec;.;..\..\..\include;..\..\..\include\leptonica;..\port;..\..\opencl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\..\api;..\..\ccmain;..\..\ccutil;..\..\ccstruct;..\..\classify;..\..\cube;..\..\cutil;..\..\dict;..\..\neural_networks\runtime;..\..\textord;..\..\viewer;..\..\wordrec;.;..\..\..\include;..\..\..\include\leptonica;..\port;..\..\opencl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;_USRDLL;_WINDLL;USE_STD_NAMESPACE;TESS_EXPORTS;LIBLEPT_IMPORTS;WINDLLNAME="$(TargetFileName)";%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;_USRDLL;_WINDLL;USE_STD_NAMESPACE;TESS_EXPORTS;LIBLEPT_IMPORTS;WINDLLNAME="$(TargetFileName)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild> <MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@ -278,7 +278,6 @@ copy "$(TargetDir)$(TargetName).lib" ..\..\..\lib
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="..\..\ccmain\adaptions.cpp" /> <ClCompile Include="..\..\ccmain\adaptions.cpp" />
<ClCompile Include="..\..\ccmain\par_control.cpp" />
<ClCompile Include="..\..\classify\adaptive.cpp" /> <ClCompile Include="..\..\classify\adaptive.cpp" />
<ClCompile Include="..\..\classify\adaptmatch.cpp" /> <ClCompile Include="..\..\classify\adaptmatch.cpp" />
<ClCompile Include="..\..\opencl\openclwrapper.cpp" /> <ClCompile Include="..\..\opencl\openclwrapper.cpp" />
@ -288,6 +287,7 @@ copy "$(TargetDir)$(TargetName).lib" ..\..\..\lib
<ClCompile Include="..\..\ccmain\applybox.cpp" /> <ClCompile Include="..\..\ccmain\applybox.cpp" />
<ClCompile Include="..\..\wordrec\associate.cpp" /> <ClCompile Include="..\..\wordrec\associate.cpp" />
<ClCompile Include="..\..\api\baseapi.cpp" /> <ClCompile Include="..\..\api\baseapi.cpp" />
<ClCompile Include="..\..\api\pdfrenderer.cpp" />
<ClCompile Include="..\..\ccutil\basedir.cpp" /> <ClCompile Include="..\..\ccutil\basedir.cpp" />
<ClCompile Include="..\..\textord\bbgrid.cpp" /> <ClCompile Include="..\..\textord\bbgrid.cpp" />
<ClCompile Include="..\..\cube\beam_search.cpp" /> <ClCompile Include="..\..\cube\beam_search.cpp" />
@ -385,13 +385,9 @@ copy "$(TargetDir)$(TargetName).lib" ..\..\..\lib
<ClCompile Include="..\port\gettimeofday.cpp" /> <ClCompile Include="..\port\gettimeofday.cpp" />
<ClCompile Include="..\..\ccutil\globaloc.cpp" /> <ClCompile Include="..\..\ccutil\globaloc.cpp" />
<ClCompile Include="..\..\wordrec\gradechop.cpp" /> <ClCompile Include="..\..\wordrec\gradechop.cpp" />
<ClCompile Include="..\..\ccutil\hashfn.cpp" />
<ClCompile Include="..\..\cube\hybrid_neural_net_classifier.cpp" /> <ClCompile Include="..\..\cube\hybrid_neural_net_classifier.cpp" />
<ClCompile Include="..\..\dict\hyphen.cpp" /> <ClCompile Include="..\..\dict\hyphen.cpp" />
<ClCompile Include="..\..\image\image.cpp" />
<ClCompile Include="..\..\textord\imagefind.cpp" /> <ClCompile Include="..\..\textord\imagefind.cpp" />
<ClCompile Include="..\..\image\imgs.cpp" />
<ClCompile Include="..\..\ccmain\imgscale.cpp" />
<ClCompile Include="..\..\ccutil\indexmapbidi.cpp" /> <ClCompile Include="..\..\ccutil\indexmapbidi.cpp" />
<ClCompile Include="..\..\neural_networks\runtime\input_file_buffer.cpp" /> <ClCompile Include="..\..\neural_networks\runtime\input_file_buffer.cpp" />
<ClCompile Include="..\..\classify\intfeaturedist.cpp" /> <ClCompile Include="..\..\classify\intfeaturedist.cpp" />
@ -440,6 +436,7 @@ copy "$(TargetDir)$(TargetName).lib" ..\..\..\lib
<ClCompile Include="..\..\ccmain\pagewalk.cpp" /> <ClCompile Include="..\..\ccmain\pagewalk.cpp" />
<ClCompile Include="..\..\ccmain\paragraphs.cpp" /> <ClCompile Include="..\..\ccmain\paragraphs.cpp" />
<ClCompile Include="..\..\ccutil\params.cpp" /> <ClCompile Include="..\..\ccutil\params.cpp" />
<ClCompile Include="..\..\ccmain\par_control.cpp" />
<ClCompile Include="..\..\ccmain\paramsd.cpp" /> <ClCompile Include="..\..\ccmain\paramsd.cpp" />
<ClCompile Include="..\..\ccstruct\pdblock.cpp" /> <ClCompile Include="..\..\ccstruct\pdblock.cpp" />
<ClCompile Include="..\..\dict\permdawg.cpp" /> <ClCompile Include="..\..\dict\permdawg.cpp" />
@ -455,7 +452,6 @@ copy "$(TargetDir)$(TargetName).lib" ..\..\..\lib
<ClCompile Include="..\..\classify\protos.cpp" /> <ClCompile Include="..\..\classify\protos.cpp" />
<ClCompile Include="..\..\ccstruct\publictypes.cpp" /> <ClCompile Include="..\..\ccstruct\publictypes.cpp" />
<ClCompile Include="..\..\ccstruct\quadlsq.cpp" /> <ClCompile Include="..\..\ccstruct\quadlsq.cpp" />
<ClCompile Include="..\..\ccstruct\quadratc.cpp" />
<ClCompile Include="..\..\ccstruct\quspline.cpp" /> <ClCompile Include="..\..\ccstruct\quspline.cpp" />
<ClCompile Include="..\..\ccstruct\ratngs.cpp" /> <ClCompile Include="..\..\ccstruct\ratngs.cpp" />
<ClCompile Include="..\..\ccmain\recogtraining.cpp" /> <ClCompile Include="..\..\ccmain\recogtraining.cpp" />
@ -465,7 +461,6 @@ copy "$(TargetDir)$(TargetName).lib" ..\..\..\lib
<ClCompile Include="..\..\wordrec\render.cpp" /> <ClCompile Include="..\..\wordrec\render.cpp" />
<ClCompile Include="..\..\ccmain\resultiterator.cpp" /> <ClCompile Include="..\..\ccmain\resultiterator.cpp" />
<ClCompile Include="..\..\classify\sampleiterator.cpp" /> <ClCompile Include="..\..\classify\sampleiterator.cpp" />
<ClCompile Include="..\..\ccmain\scaleimg.cpp" />
<ClCompile Include="..\..\textord\scanedg.cpp" /> <ClCompile Include="..\..\textord\scanedg.cpp" />
<ClCompile Include="..\..\viewer\scrollview.cpp" /> <ClCompile Include="..\..\viewer\scrollview.cpp" />
<ClCompile Include="..\..\ccstruct\seam.cpp" /> <ClCompile Include="..\..\ccstruct\seam.cpp" />
@ -486,7 +481,6 @@ copy "$(TargetDir)$(TargetName).lib" ..\..\..\lib
<ClCompile Include="..\..\cutil\structures.cpp" /> <ClCompile Include="..\..\cutil\structures.cpp" />
<ClCompile Include="..\..\viewer\svmnode.cpp" /> <ClCompile Include="..\..\viewer\svmnode.cpp" />
<ClCompile Include="..\..\viewer\svpaint.cpp" /> <ClCompile Include="..\..\viewer\svpaint.cpp" />
<ClCompile Include="..\..\image\svshowim.cpp" />
<ClCompile Include="..\..\viewer\svutil.cpp" /> <ClCompile Include="..\..\viewer\svutil.cpp" />
<ClCompile Include="..\..\textord\tabfind.cpp" /> <ClCompile Include="..\..\textord\tabfind.cpp" />
<ClCompile Include="..\..\textord\tablefind.cpp" /> <ClCompile Include="..\..\textord\tablefind.cpp" />
@ -665,13 +659,7 @@ copy "$(TargetDir)$(TargetName).lib" ..\..\..\lib
<ClInclude Include="..\..\ccutil\host.h" /> <ClInclude Include="..\..\ccutil\host.h" />
<ClInclude Include="..\..\ccstruct\hpdsizes.h" /> <ClInclude Include="..\..\ccstruct\hpdsizes.h" />
<ClInclude Include="..\..\cube\hybrid_neural_net_classifier.h" /> <ClInclude Include="..\..\cube\hybrid_neural_net_classifier.h" />
<ClInclude Include="..\..\image\image.h" />
<ClInclude Include="..\..\textord\imagefind.h" /> <ClInclude Include="..\..\textord\imagefind.h" />
<ClInclude Include="..\..\image\img.h" />
<ClInclude Include="..\..\image\imgerrs.h" />
<ClInclude Include="..\..\image\imgs.h" />
<ClInclude Include="..\..\ccmain\imgscale.h" />
<ClInclude Include="..\..\image\imgunpk.h" />
<ClInclude Include="..\..\ccutil\indexmapbidi.h" /> <ClInclude Include="..\..\ccutil\indexmapbidi.h" />
<ClInclude Include="..\..\neural_networks\runtime\input_file_buffer.h" /> <ClInclude Include="..\..\neural_networks\runtime\input_file_buffer.h" />
<ClInclude Include="..\..\classify\intfeaturedist.h" /> <ClInclude Include="..\..\classify\intfeaturedist.h" />
@ -755,7 +743,6 @@ copy "$(TargetDir)$(TargetName).lib" ..\..\..\lib
<ClInclude Include="resource.h" /> <ClInclude Include="resource.h" />
<ClInclude Include="..\..\ccmain\resultiterator.h" /> <ClInclude Include="..\..\ccmain\resultiterator.h" />
<ClInclude Include="..\..\classify\sampleiterator.h" /> <ClInclude Include="..\..\classify\sampleiterator.h" />
<ClInclude Include="..\..\ccmain\scaleimg.h" />
<ClInclude Include="..\..\textord\scanedg.h" /> <ClInclude Include="..\..\textord\scanedg.h" />
<ClInclude Include="..\..\viewer\scrollview.h" /> <ClInclude Include="..\..\viewer\scrollview.h" />
<ClInclude Include="..\..\ccstruct\seam.h" /> <ClInclude Include="..\..\ccstruct\seam.h" />
@ -779,7 +766,6 @@ copy "$(TargetDir)$(TargetName).lib" ..\..\..\lib
<ClInclude Include="..\port\strtok_r.h" /> <ClInclude Include="..\port\strtok_r.h" />
<ClInclude Include="..\..\cutil\structures.h" /> <ClInclude Include="..\..\cutil\structures.h" />
<ClInclude Include="..\..\viewer\svmnode.h" /> <ClInclude Include="..\..\viewer\svmnode.h" />
<ClInclude Include="..\..\image\svshowim.h" />
<ClInclude Include="..\..\viewer\svutil.h" /> <ClInclude Include="..\..\viewer\svutil.h" />
<ClInclude Include="..\..\textord\tabfind.h" /> <ClInclude Include="..\..\textord\tabfind.h" />
<ClInclude Include="..\..\textord\tablefind.h" /> <ClInclude Include="..\..\textord\tablefind.h" />

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup> <ItemGroup>
<ClCompile Include="..\..\ccmain\adaptions.cpp"> <ClCompile Include="..\..\ccmain\adaptions.cpp">
@ -328,27 +328,15 @@
<ClCompile Include="..\..\wordrec\gradechop.cpp"> <ClCompile Include="..\..\wordrec\gradechop.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\ccutil\hashfn.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\cube\hybrid_neural_net_classifier.cpp"> <ClCompile Include="..\..\cube\hybrid_neural_net_classifier.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\dict\hyphen.cpp"> <ClCompile Include="..\..\dict\hyphen.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\image\image.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\textord\imagefind.cpp"> <ClCompile Include="..\..\textord\imagefind.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\image\imgs.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\ccmain\imgscale.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\ccutil\indexmapbidi.cpp"> <ClCompile Include="..\..\ccutil\indexmapbidi.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
@ -496,9 +484,6 @@
<ClCompile Include="..\..\ccmain\pagewalk.cpp"> <ClCompile Include="..\..\ccmain\pagewalk.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\ccmain\par_control.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\ccmain\paragraphs.cpp"> <ClCompile Include="..\..\ccmain\paragraphs.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
@ -556,9 +541,6 @@
<ClCompile Include="..\..\ccstruct\quadlsq.cpp"> <ClCompile Include="..\..\ccstruct\quadlsq.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\ccstruct\quadratc.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\ccstruct\quspline.cpp"> <ClCompile Include="..\..\ccstruct\quspline.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
@ -589,9 +571,6 @@
<ClCompile Include="..\..\classify\sampleiterator.cpp"> <ClCompile Include="..\..\classify\sampleiterator.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\ccmain\scaleimg.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\textord\scanedg.cpp"> <ClCompile Include="..\..\textord\scanedg.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
@ -661,9 +640,6 @@
<ClCompile Include="..\..\viewer\svpaint.cpp"> <ClCompile Include="..\..\viewer\svpaint.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\image\svshowim.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\viewer\svutil.cpp"> <ClCompile Include="..\..\viewer\svutil.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
@ -802,6 +778,12 @@
<ClCompile Include="..\..\classify\xform2d.cpp"> <ClCompile Include="..\..\classify\xform2d.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\api\pdfrenderer.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\ccmain\par_control.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="..\..\classify\adaptive.h"> <ClInclude Include="..\..\classify\adaptive.h">
@ -1170,27 +1152,9 @@
<ClInclude Include="..\..\cube\hybrid_neural_net_classifier.h"> <ClInclude Include="..\..\cube\hybrid_neural_net_classifier.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\..\image\image.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\textord\imagefind.h"> <ClInclude Include="..\..\textord\imagefind.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\..\image\img.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\image\imgerrs.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\image\imgs.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\ccmain\imgscale.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\image\imgunpk.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\ccutil\indexmapbidi.h"> <ClInclude Include="..\..\ccutil\indexmapbidi.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
@ -1437,9 +1401,6 @@
<ClInclude Include="..\..\classify\sampleiterator.h"> <ClInclude Include="..\..\classify\sampleiterator.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\..\ccmain\scaleimg.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\textord\pitsync1.h"> <ClInclude Include="..\..\textord\pitsync1.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
@ -1545,9 +1506,6 @@
<ClInclude Include="..\..\viewer\svmnode.h"> <ClInclude Include="..\..\viewer\svmnode.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\..\image\svshowim.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\viewer\svutil.h"> <ClInclude Include="..\..\viewer\svutil.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>

View File

@ -17,7 +17,6 @@
// //
/////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////
#ifndef VS2008_INCLUDE_MATHFIX_H_ #ifndef VS2008_INCLUDE_MATHFIX_H_
#define VS2008_INCLUDE_MATHFIXT_H_ #define VS2008_INCLUDE_MATHFIXT_H_
@ -30,6 +29,7 @@
#define isnan(x) _isnan(x) #define isnan(x) _isnan(x)
#define isinf(x) (!_finite(x)) #define isinf(x) (!_finite(x))
#define fmax max //VC++ does not implement all the provisions of C99 Standard #define fmax max //VC++ does not implement all the provisions of C99 Standard
#define round(x) roundf(x)
inline float roundf(float num) { return num > 0 ? floorf(num + 0.5f) : ceilf(num - 0.5f); } inline float roundf(float num) { return num > 0 ? floorf(num + 0.5f) : ceilf(num - 0.5f); }
#endif // VS2008_INCLUDE_MATHFIXT_H_ #endif // VS2008_INCLUDE_MATHFIXT_H_