Skip to content

Commit aee910a

Browse files
committed
Fixed build broken by previous commits that added use of string in low-level code
1 parent df41eab commit aee910a

File tree

9 files changed

+14
-6
lines changed

9 files changed

+14
-6
lines changed

ccstruct/Makefile.am

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ AM_CPPFLAGS += \
22
-I$(top_srcdir)/ccutil -I$(top_srcdir)/cutil \
33
-I$(top_srcdir)/viewer \
44
-I$(top_srcdir)/opencl
5-
AM_CPPFLAGS += $(OPENCL_CPPFLAGS)
5+
AM_CPPFLAGS += $(OPENCL_CPPFLAGS) -DUSE_STD_NAMESPACE
66

77
if VISIBILITY
88
AM_CPPFLAGS += -DTESS_EXPORTS \

ccutil/Makefile.am

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
AUTOMAKE_OPTIONS = subdir-objects
22
SUBDIRS =
33
AM_CXXFLAGS =
4+
AM_CPPFLAGS = -DUSE_STD_NAMESPACE
45

56
if !NO_TESSDATA_PREFIX
67
AM_CXXFLAGS += -DTESSDATA_PREFIX=@datadir@/

ccutil/platform.h

+6
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@
5353
#define SIGNED signed
5454
#endif
5555

56+
// Fix to map between google use of string without std and everywhere else.
57+
#ifdef USE_STD_NAMESPACE
58+
#include <string>
59+
using std::string;
60+
#endif
61+
5662
#if defined(_WIN32) || defined(__CYGWIN__)
5763
#ifndef M_PI
5864
#define M_PI 3.14159265358979323846

ccutil/unichar.h

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include <string.h>
2525
#include <string>
2626
#include <vector>
27+
#include "platform.h"
2728

2829
// Maximum number of characters that can be stored in a UNICHAR. Must be
2930
// at least 4. Must not exceed 31 without changing the coding of length.

classify/Makefile.am

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
AM_CPPFLAGS += \
22
-I$(top_srcdir)/cutil -I$(top_srcdir)/ccutil \
33
-I$(top_srcdir)/ccstruct -I$(top_srcdir)/dict \
4-
-I$(top_srcdir)/viewer
4+
-I$(top_srcdir)/viewer -DUSE_STD_NAMESPACE
55

66
if VISIBILITY
77
AM_CPPFLAGS += -DTESS_EXPORTS \

cutil/Makefile.am

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
AM_CPPFLAGS += -I$(top_srcdir)/ccutil -I$(top_srcdir)/viewer
1+
AM_CPPFLAGS += -I$(top_srcdir)/ccutil -I$(top_srcdir)/viewer -DUSE_STD_NAMESPACE
22

33
if VISIBILITY
44
AM_CPPFLAGS += -DTESS_EXPORTS \

dict/Makefile.am

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
AM_CPPFLAGS += -I$(top_srcdir)/cutil -I$(top_srcdir)/ccutil \
2-
-I$(top_srcdir)/ccstruct -I$(top_srcdir)/viewer
2+
-I$(top_srcdir)/ccstruct -I$(top_srcdir)/viewer -DUSE_STD_NAMESPACE
33

44
if VISIBILITY
55
AM_CPPFLAGS += -DTESS_EXPORTS \

lstm/Makefile.am

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
AM_CPPFLAGS += \
22
-I$(top_srcdir)/ccutil -I$(top_srcdir)/cutil -I$(top_srcdir)/ccstruct \
33
-I$(top_srcdir)/arch -I$(top_srcdir)/viewer -I$(top_srcdir)/classify \
4-
-I$(top_srcdir)/dict -I$(top_srcdir)/lstm
4+
-I$(top_srcdir)/dict -I$(top_srcdir)/lstm -DUSE_STD_NAMESPACE
55
AUTOMAKE_OPTIONS = subdir-objects
66
SUBDIRS =
77
AM_CXXFLAGS = $(OPENMP_CXXFLAGS)

wordrec/Makefile.am

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ AM_CPPFLAGS += \
22
-I$(top_srcdir)/ccstruct -I$(top_srcdir)/ccutil \
33
-I$(top_srcdir)/cutil -I$(top_srcdir)/classify \
44
-I$(top_srcdir)/dict \
5-
-I$(top_srcdir)/viewer
5+
-I$(top_srcdir)/viewer -DUSE_STD_NAMESPACE
66

77
if VISIBILITY
88
AM_CPPFLAGS += -DTESS_EXPORTS \

0 commit comments

Comments
 (0)