Fail to build with GCC 7
Here I try to build the latest git snapshot 0ba6e25e078a040195d7295e860cc9064bef7c2c
Build for debian unstable amd64 with tesseract 4.00~git2174-3b62badd-5
cd "/src/vobsub2srt-1.0~pre7+20171219/build/src" && /usr/lib/ccache/c++ -DINSTALL_PREFIX=\"/usr\" -I"/src/vobsub2srt-1.0~pre7+20171219/mplayer" -ansi -pedantic -Wall -Wextra -Wno-long-long -o CMakeFiles/vobsub2srt.dir/vobsub2srt.c++.o -c "/src/vobsub2srt-1.0~pre7+20171219/src/vobsub2srt.c++"
In file included from /usr/include/c++/7/cinttypes:35:0,
from /usr/include/tesseract/host.h:30,
from /usr/include/tesseract/serialis.h:26,
from /usr/include/tesseract/baseapi.h:32,
from /src/vobsub2srt-1.0~pre7+20171219/src/vobsub2srt.c++:27:
/usr/include/c++/7/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support \
^~~~~
In file included from /usr/include/tesseract/apitypes.h:23:0,
from /usr/include/tesseract/baseapi.h:27,
from /src/vobsub2srt-1.0~pre7+20171219/src/vobsub2srt.c++:27:
/usr/include/tesseract/publictypes.h:33:1: error: 'constexpr' does not name a type
constexpr int kPointsPerInch = 72;
^~~~~~~~~
/usr/include/tesseract/publictypes.h:33:1: note: C++11 'constexpr' only available with -std=c++11 or -std=gnu++11
/usr/include/tesseract/publictypes.h:38:1: error: 'constexpr' does not name a type
constexpr int kMinCredibleResolution = 70;
^~~~~~~~~
/usr/include/tesseract/publictypes.h:38:1: note: C++11 'constexpr' only available with -std=c++11 or -std=gnu++11
/usr/include/tesseract/publictypes.h:40:1: error: 'constexpr' does not name a type
constexpr int kMaxCredibleResolution = 2400;
^~~~~~~~~
/usr/include/tesseract/publictypes.h:40:1: note: C++11 'constexpr' only available with -std=c++11 or -std=gnu++11
/usr/include/tesseract/publictypes.h:45:1: error: 'constexpr' does not name a type
constexpr int kResolutionEstimationFactor = 10;
^~~~~~~~~
/usr/include/tesseract/publictypes.h:45:1: note: C++11 'constexpr' only available with -std=c++11 or -std=gnu++11
In file included from /usr/include/tesseract/ltrresultiterator.h:26:0,
from /usr/include/tesseract/resultiterator.h:26,
from /usr/include/tesseract/baseapi.h:31,
from /src/vobsub2srt-1.0~pre7+20171219/src/vobsub2srt.c++:27:
/usr/include/tesseract/unichar.h:164:10: error: 'string' does not name a type; did you mean 'stdin'?
static string UTF32ToUTF8(const std::vector<char32>& str32);
^~~~~~
stdin
/src/vobsub2srt-1.0~pre7+20171219/src/vobsub2srt.c++: In function 'int main(int, char**)':
/src/vobsub2srt-1.0~pre7+20171219/src/vobsub2srt.c++:218:3: error: 'TessBaseAPI' has not been declared
TessBaseAPI::SimpleInit(tess_path, tess_lang, false); // TODO params
^~~~~~~~~~~
/src/vobsub2srt-1.0~pre7+20171219/src/vobsub2srt.c++:220:5: error: 'TessBaseAPI' has not been declared
TessBaseAPI::SetVariable("tessedit_char_blacklist", blacklist.c_str());
^~~~~~~~~~~
/src/vobsub2srt-1.0~pre7+20171219/src/vobsub2srt.c++:275:20: error: 'TessBaseAPI' has not been declared
char *text = TessBaseAPI::TesseractRect(image, 1, stride, 0, 0, width, height);
^~~~~~~~~~~
/src/vobsub2srt-1.0~pre7+20171219/src/vobsub2srt.c++:314:3: error: 'TessBaseAPI' has not been declared
TessBaseAPI::End();
^~~~~~~~~~~
src/CMakeFiles/vobsub2srt.dir/build.make:65: recipe for target 'src/CMakeFiles/vobsub2srt.dir/vobsub2srt.c++.o' failed
make[2]: *** [src/CMakeFiles/vobsub2srt.dir/vobsub2srt.c++.o] Error 1
Same as #67 ?
I just managed to build on debian unstable, with; git checkout autotools ./bootstrap ./configure CXXFLAGS=-std=gnu++11 make
I just managed to build on debian unstable, with; git checkout autotools ./bootstrap ./configure CXXFLAGS=-std=gnu++11 make
I did this on WSL Kali (Debian-like), and got:
/usr/bin/ld: src/vobsub2srt-vobsub2srt.o: in function
main': vobsub2srt.c++:(.text+0xa2e): undefined reference totesseract::TessBaseAPI::TessBaseAPI()' /usr/bin/ld: vobsub2srt.c++:(.text+0xab3): undefined reference totesseract::TessBaseAPI::SetVariable(char const*, char const*)' /usr/bin/ld: vobsub2srt.c++:(.text+0xe32): undefined reference totesseract::TessBaseAPI::TesseractRect(unsigned char const*, int, int, int, int, int, int)' /usr/bin/ld: vobsub2srt.c++:(.text+0x11db): undefined reference totesseract::TessBaseAPI::End()' /usr/bin/ld: vobsub2srt.c++:(.text+0x1280): undefined reference totesseract::TessBaseAPI::~TessBaseAPI()' /usr/bin/ld: vobsub2srt.c++:(.text+0x13f1): undefined reference totesseract::TessBaseAPI::~TessBaseAPI()' /usr/bin/ld: src/vobsub2srt-vobsub2srt.o: in functiontesseract::TessBaseAPI::Init(char const*, char const*)': vobsub2srt.c++:(.text.ZN9tesseract11TessBaseAPI4InitEPKcS2[ZN9tesseract11TessBaseAPI4InitEPKcS2]+0x3f): undefined reference to `tesseract::TessBaseAPI::Init(char const*, char const*, tesseract::OcrEngineMode, char**, int, GenericVector<STRING> const*, GenericVector<STRING> const*, bool)' collect2: error: ld returned 1 exit status make: *** [Makefile:476: vobsub2srt] Error 1