mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-01-19 15:03:45 +08:00
Only include windows.h using host.h
host.h sets the macros NOMINMAX and WIN32_LEAN_AND_MEAN which must be set before including windows.h. Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
668f59f3f8
commit
315bd3a9c8
@ -15,10 +15,10 @@
|
|||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <sstream> // for std::stringstream
|
#include <sstream> // for std::stringstream
|
||||||
#ifdef _WIN32
|
|
||||||
# include <windows.h> // MultiByteToWideChar, ...
|
|
||||||
#endif
|
|
||||||
#include "baseapi.h"
|
#include "baseapi.h"
|
||||||
|
#ifdef _WIN32
|
||||||
|
# include "host.h" // windows.h for MultiByteToWideChar, ...
|
||||||
|
#endif
|
||||||
#include "renderer.h"
|
#include "renderer.h"
|
||||||
|
|
||||||
namespace tesseract {
|
namespace tesseract {
|
||||||
|
@ -20,10 +20,10 @@
|
|||||||
#include <locale> // for std::locale::classic
|
#include <locale> // for std::locale::classic
|
||||||
#include <memory> // for std::unique_ptr
|
#include <memory> // for std::unique_ptr
|
||||||
#include <sstream> // for std::stringstream
|
#include <sstream> // for std::stringstream
|
||||||
#ifdef _WIN32
|
|
||||||
# include <windows.h> // MultiByteToWideChar, ...
|
|
||||||
#endif
|
|
||||||
#include "baseapi.h" // for TessBaseAPI
|
#include "baseapi.h" // for TessBaseAPI
|
||||||
|
#ifdef _WIN32
|
||||||
|
# include "host.h" // windows.h for MultiByteToWideChar, ...
|
||||||
|
#endif
|
||||||
#include "renderer.h"
|
#include "renderer.h"
|
||||||
#include "tesseractclass.h" // for Tesseract
|
#include "tesseractclass.h" // for Tesseract
|
||||||
|
|
||||||
|
@ -19,15 +19,16 @@
|
|||||||
#ifndef TESSERACT_CCUTIL_CCUTIL_H_
|
#ifndef TESSERACT_CCUTIL_CCUTIL_H_
|
||||||
#define TESSERACT_CCUTIL_CCUTIL_H_
|
#define TESSERACT_CCUTIL_CCUTIL_H_
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifndef _WIN32
|
||||||
#include <windows.h> // HANDLE, ...
|
|
||||||
#else
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <semaphore.h>
|
#include <semaphore.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "ambigs.h"
|
#include "ambigs.h"
|
||||||
#include "errcode.h"
|
#include "errcode.h"
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include "host.h" // windows.h for HANDLE, ...
|
||||||
|
#endif
|
||||||
#include "strngs.h"
|
#include "strngs.h"
|
||||||
#include "params.h"
|
#include "params.h"
|
||||||
#include "unicharset.h"
|
#include "unicharset.h"
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <windows.h> // BOOL, ...
|
|
||||||
#ifndef unlink
|
#ifndef unlink
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
#endif
|
#endif
|
||||||
@ -30,6 +29,7 @@
|
|||||||
|
|
||||||
#include "errcode.h"
|
#include "errcode.h"
|
||||||
#include "fileio.h"
|
#include "fileio.h"
|
||||||
|
#include "host.h" // includes windows.h for BOOL, ...
|
||||||
#include "tprintf.h"
|
#include "tprintf.h"
|
||||||
|
|
||||||
namespace tesseract {
|
namespace tesseract {
|
||||||
|
Loading…
Reference in New Issue
Block a user