Compiling tesseract on Windows using Cygwin GCC - c++

Getting below error while compiling tesseract source on Windows using Cygwin GCC:
-MT"training/commontraining.d" -o "training/commontraining.o" "../training/commontraining.cpp"
../training/commontraining.cpp:17:30: fatal error: base/init_google.h: No such file or directory
Please help me find which library provides the init_google.h header file.

Related

I get "gcc.exe: fatal error: cannot execute 'cc1plus'" when I try to compile a program in C++ in Windows

I get the error "gcc.exe: fatal error: cannot execute 'cc1plus'" when I want to compile any program in C++. I didn't installed the compiler Mingw-w64, downloaded the zip from winlibs.com and I copied it to "C:". Then I added to the environment variable Path.
I tried to move the library cc1plus.exe.o to the lib folder of Mingw, and used the commands gcc test.cpp -o test.exe and gcc.exe test.cpp -o text.exe.
The OS is Windows.
Thank you.

How to compile tesseract baseapi.h with MinGW on window?

So I want to use tesseract api on my project.
And the problem is I don't know how to compile this baseapi.h with MinGW on window.
I'm using this
g++ -I/[...]/project/tesseract-master/include/ -I/[...]/project/leptonica/src/ t.cpp -o t
and got
In file included from t.cpp:2:
/[...]/project/tesseract-master/include/tesseract/baseapi.h:33:10: fatal error: tesseract/version.h: No such file or directory
#include <tesseract/version.h>
^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
I think the problem is about version.h file, It's actually a version.h.in file
leptonica also have same problem with .h.in file
I don't know if MinGW can compile this type of file, so if there's a way or it can't pls tell me thanks.
g++.exe (i686-posix-dwarf-rev0, Built by MinGW-W64 project) 8.1.0
Tesseract from main branch https://github.com/tesseract-ocr/tesseract
Leptonica from 1.80.0 release
https://github.com/DanBloomberg/leptonica
It seems that you did not install tesseract - otherwise version.h (actually generated during tesseract build/compilation) would be present.

Mac Catalina Clang not able to find header files in /usr/local/include

Currently I am trying to compile a llvm C++ file including the following header file:
#include <clang-c/Index.h>
and I have made sure that clang-c/Index.h does exist in /usr/local/include/clang-c/Index.h, but when I try to compile it with
clang++ main.cpp
the compile says
fatal error: 'clang-c/Platform.h' file not found
Any help would be appreciated!

"fatal error: boost/regex.hpp: No such file or directory" when trying to compile C++ program using a makefile

I am trying to compile a piece of open source software called "SPECIES
Identification of Taxonomic Mentions in Text". I am on MacOS.
I downloaded the source code (which can be found here), moved into the directory and used the command make to compile. This is the error returned:
g++ -fpic -pthread -Wall -O3 -o organisms organisms.cxx -lm -lboost_regex
In file included from batch_tagger.h:5:0,
from organisms.cxx:3:
tagger.h:7:27: fatal error: boost/regex.hpp: No such file or directory
compilation terminated.
make: *** [organisms] Error 1
I installed the C++ boost library using brew install boostand tried the above steps again (it did not work).
I tried dropping the boost directory into the directory containing the source code (it did not work).
Any suggestions/help?
You need to tell the compiler where to find boost headers.
You need to use the include path option to specify where the boost headers can be find, use -I/path/to/boost/include.
Then include the file using #include <boost/regex.hpp> from your code.

missing .lib files while compiling qt 4.8 project

I'm trying to build Open-Sankoré project (https://github.com/Sankore/Sankore-3.1) on qt-creator using qt 4.8.6 kit & mingw4 on windows..
I was able to overcome many compiler errors subsequently through some workarounds but this error stumped me:
g++: ole32.lib: No such file or directory
g++: oleaut32.lib: No such file or directory
g++: user32.lib: No such file or directory
g++: gdi32.lib: No such file or directory
g++: advapi32.lib: No such file or directory
I guess it's related to msvc compiler and that I'm compiling now using gcc..
Anyone have an idea how to fix this ??
g++ cannot use .lib generated by msvc, is use libXXX.a lib files
download Qt for mingw g++
http://download.qt.io/official_releases/qt/4.8/4.8.7/qt-opensource-windows-x86-mingw482-4.8.7.exe